[20190211]簡單測試埠是否開啟(補充).txt
[20190211]簡單測試埠是否開啟(補充).txt
--//上午使用cat < /dev/tcp/ip_address/port方式測試,感覺有點慢,而且發現1521埠受引數INBOUND_CONNECT_TIMEOUT_LISTENER控制.
--//而這個預設設定就是60秒,下午測試使用ssh埠看看:
# zdate ;cat < /dev/tcp/192.168.100.78/22;zdate
2019/02/11 14:55:25
SSH-2.0-OpenSSH_4.3
2019/02/11 14:57:25
# zdate ;echo a> /dev/tcp/192.168.100.78/22;zdate
2019/02/11 15:01:09
2019/02/11 15:01:09
--//ssh埠需要120秒(2分鐘).
# grep 120 /etc/ssh/sshd_config
# grep 2 /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $
#Port 22
#Protocol 2,1
Protocol 2
# HostKeys for protocol version 2
#LoginGraceTime 2m
# similar for protocol version 2
--//可以發現LoginGraceTime引數應該符合定義.
Description
SSH should be configured to log users out after a 15 minute interval of inactivity and to only wait 30 seconds before
timing out login attempts. Terminating an idle session within a short time period reduces the window of opportunity for
unauthorized personnel to take control of a management session enabled on the console or console port that has been left
unattended. In addition, quickly terminating an idle session or an incomplete login attempt will also free up resources
committed by the managed network element.
http://www.faqs.org/docs/securing/chap15sec122.html
LoginGraceTime 600
The option LoginGraceTime specifies how long in seconds after a connection request the server will wait before
disconnecting if the user has not successfully logged in.
--//修改為30秒,測試看看:
# grep LoginGraceTime /etc/ssh/sshd_config
LoginGraceTime 30
#LoginGraceTime 2m
# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
# zdate ;cat < /dev/tcp/192.168.100.78/22;zdate
2019/02/11 15:09:44
SSH-2.0-OpenSSH_4.3
2019/02/11 15:10:14
--//正好30秒.實際上一般每個開啟的服務埠都有類似的引數設定.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2619253/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20190211]簡單測試埠是否開啟.txt
- [20220603]測試quiz night(補充).txtUI
- [20190213]測試服務端開啟那些埠.txt服務端
- Linux命令--nc (測試伺服器埠是否開啟)Linux伺服器
- [20211013]測試遠端監聽補充.txt
- [20180129]簡單探究cluster table(補充)4.txt
- [20181229]簡單探究cluster table(補充)3.txt
- [20181227]簡單探究cluster table(補充)2.txt
- [20211025]12c sequence nocache測試補充.txt
- [20201116]測試CURSOR_SPACE_FOR_TIME(10g)(補充).txt
- [20190301]簡單測試linux fsfreeze命令.txtLinux
- iOS Framework 單元測試(二)-- JDAppTests(XCTests的補充)iOSFrameworkAPP
- [20190423]簡單測試latch nowilling等待模式.txt模式
- linux下3種檢測遠端埠是否開啟的方法Linux
- [20180627]測試bbed是否支援管道命令.txt
- [20220815]奇怪的隱式轉換問題(11g測試補充).txt
- [20220811]奇怪的隱式轉換問題(12c補充測試).txt
- 如何檢視遠端埠是否開啟
- [20180928]ora-01426(補充).txt
- [20241016]Oracle C functions annotations補充.txtOracleFunction
- [20211215]提示precompute_subquery補充.txt
- 安防綜合管理系統EasyCVR影片匯聚平臺Linux環境,如何測試UDP埠是否開啟?VRLinuxUDP
- [20211116]plsql_code_type=native補充.txtSQL
- [20210813]關於測試sql語句子游標的效能的一些補充說明.txtSQL
- [20190423]簡單測試user和SYS_CONTEXT ('USERENV','CURRENT_USER').txtContext
- forms元件補充與ModelForm簡單使用與cookie與sessionORM元件CookieSession
- [20230510]測試使用tpt ddl指令碼是否產生日誌.txt指令碼
- Java檢測埠是否被佔用Java
- 簡單的 ping 測試
- mysql簡單效能測試MySql
- Oracle logmnr簡單測試Oracle
- [20211221]提示precompute_subquery補充2.txt
- [20210803]使用那個shared pool latch(補充).txt
- [20221014]TNS-12543 TNSdestination host unreachable(補充).txt
- curl 測試埠
- [20190211]rac下解鎖應用出現的阻塞.txt
- 有了測試團隊,再寫單元測試,是否是浪費開發時間呢?
- [20220119]超長sql語句補充3.txtSQL