[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
- linux測試遠端埠是否開啟(nc命令)Linux
- Linux命令--nc (測試伺服器埠是否開啟)Linux伺服器
- [20190213]測試服務端開啟那些埠.txt服務端
- [20171201]nc快速判斷埠是否開啟.txt
- [20220603]測試quiz night(補充).txtUI
- [20211013]測試遠端監聽補充.txt
- iOS Framework 單元測試(二)-- JDAppTests(XCTests的補充)iOSFrameworkAPP
- 《shell條件測試語句,字串測試apache是否開啟》字串Apache
- [20171204]nc快速判斷埠是否開啟2.txt
- 如何檢視遠端埠是否開啟
- linux下3種檢測遠端埠是否開啟的方法Linux
- 安防綜合管理系統EasyCVR影片匯聚平臺Linux環境,如何測試UDP埠是否開啟?VRLinuxUDP
- 檢測Linux伺服器埠是否開通Linux伺服器
- mysql簡單效能測試MySql
- sql trace 簡單測試SQL
- curl 測試埠
- 有了測試團隊,再寫單元測試,是否是浪費開發時間呢?
- [20180627]測試bbed是否支援管道命令.txt
- [20190301]簡單測試linux fsfreeze命令.txtLinux
- Oracle logmnr簡單測試Oracle
- mysqlimport匯入簡單測試MySqlImport
- (一)Jmeter簡單介面測試JMeter
- Windows IO 效能簡單測試Windows
- Windows 10 TechPreview簡單測試WindowsView
- 簡單的 ping 測試
- Jmeter效能測試簡單使用JMeter
- try的簡單效能測試
- Java檢測埠是否被佔用Java
- [20220815]奇怪的隱式轉換問題(11g測試補充).txt
- [20220811]奇怪的隱式轉換問題(12c補充測試).txt
- Telnet埠測試
- forms元件補充與ModelForm簡單使用與cookie與sessionORM元件CookieSession
- [20161227]開啟多個監聽埠.txt
- 【PG效能測試】pgbench效能測試工具簡單使用
- [20210813]關於測試sql語句子游標的效能的一些補充說明.txtSQL
- 讓 API 測試變的簡單API
- Linux的OOMkiller簡單測試LinuxOOM