解决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       

相关文章
相关标签/搜索