解決ssh連接服務器超時自動斷開的問題

爲了安全性;ssh默認的鏈接超時時間很短;常常就是發個呆就斷開了;事實上是能夠修改超時時間的。vim

示例環境:centos

    服務器:centos6.5安全

1:[root@iZ28qa8jt4uZ /]cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak              //養成備份配置項的好習慣服務器

2:[root@iZ28qa8jt4uZ /]vim /etc/ssh/sshd_config                                           
ssh

    //刪除110行ClientAliveInterval 0 前面的註釋#號 並改成ClientAliveInterval 5spa

    //刪除111行的lientAliveCountMax 3 前面的註釋#號 並改成ClientAliveCountMax 180rest

    1.jpg

3:[root@iZ28qa8jt4uZ /]service sshd reload;博客

   [root@iZ28qa8jt4uZ /]/etc/init.d/sshd restart;it


//重啓ssh服務;配置

本文爲白俊遙原創文章,轉載無需和我聯繫,但請註明來自白俊遙博客baijunyao.com       

相關文章
相關標籤/搜索