Linux伺服器配置---ssh配置
Ssh配置
通過配置檔案,我們可以有效的管理ssh
1、空閒時間關閉連線
1)修改配置檔案“/etc/ssh/sshd_config”,設定clientAliveInterval和clientAliveCountMax,注意取消前面的註釋
確定 ]
|
2)測試超時,登入之後不要進行任何操作,10s之後連線就會關閉
|
2、輸入密碼超時,關閉連線
1)修改配置檔案“/etc/ssh/sshd_config”,設定引數“LoginGraceTime”
|
2)測試,登入的時候不輸入密碼,連線會自動斷開
|
做了一個Linux學習的平臺,目前出來一個個形,各位可以參考使用
連結:https ://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ密碼:n7bk