码迷,mamicode.com
首页 > 其他好文 > 详细

解决ssh链接服务器超时自动断开的问题

时间:2015-04-28 01:44:56      阅读:355      评论:0      收藏:0      [点我收藏+]

标签:

为了安全性;ssh默认的连接超时时间很短;经常就是发个呆就断开了;事实上是可以修改超时时间的。

示例环境:

    服务器:centos6.5

1:[root@iZ28qa8jt4uZ /]cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak              //养成备份配置项的好习惯

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

    //删除110行ClientAliveInterval 0 前面的注释#号 并改为ClientAliveInterval 5

    //删除111行的lientAliveCountMax 3 前面的注释#号 并改为ClientAliveCountMax 180

    技术分享

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

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

 

//重启ssh服务;

 

解决ssh链接服务器超时自动断开的问题

标签:

原文地址:http://www.cnblogs.com/shuaibai123/p/4461844.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!