如何避免SSH Secure Shell Client链接LINUX超时,自动断开?
来源:互联网 发布:php中把数组炸开 编辑:程序博客网 时间:2024/05/16 17:25
很多新手在使用SSH Secure Shell Client的过程中,肯定经常会遇到当用SSHSecure Shell连接Linux时,如果几分钟没有任何操作,连接就会断开,提示server responded "connection closed" 。必须重新登陆才行,每次都重复相同的操作,很是烦人。
一般修改两个地方可将这烦人的问题解决
1、echo $TMOUT
如果显示空白,表示没有设置, 等于使用默认值0, 一般情况下应该是不超时. 如果大于0, 可以在如/etc/profile之类文件中设置它为0.
Definition:TMOUT: If set to a value greater than zero, the value is interpreted as thenumber of seconds to wait for input after issuing the primary prompt. Bashterminates after waiting for that number of seconds if input does not arrive
2、修改/etc/ssh/sshd_config文件,将 ClientAliveInterval 0和ClientAliveCountMax 3的注释符号去掉,将ClientAliveInterval对应的0改成60,ClientAliveInterval指定了服务器端向客户端请求消息的时间间隔, 默认是0, 不发送.而ClientAliveInterval 60表示每分钟发送一次, 然后客户端响应, 这样就保持长连接了.ClientAliveCountMax,使用默认值3即可.ClientAliveCountMax表示服务器发出请求后客户端没有响应的次数达到一定值, 就自动断开. 正常情况下, 客户端不会不响应.
最后记得执行/etc/init.d/sshd restart 哦,否则刚才的修改是不会生效的。
想参考更多,请输入man sshd_config了解更多信息
大家这下明白了吧,是不是现在觉得很爽,在使用SSH Secure Shell Client链接LINUX的时候再也不会超时和自动断开了,也不会再出现烦人的 server responded "connection closed" 错误提示了,很开心吧!
转载自:http://hbwanghai.blog.163.com/blog/static/1992971472012224105110918/
- 如何避免SSH Secure Shell Client链接LINUX超时,自动断开?
- 如何避免SSH Secure Shell Client连接Linux超时,自动断开?
- 如何避免SSH Secure Shell Client连接Linux超时,自动断开?
- linux--SSH Secure Shell Client
- ssh secure shell client链接ubuntu服务端
- 如何解决SSH连接Linux超时自动断开?
- Linux 文件传输客户端SSH Secure Shell Client
- SSH Secure Shell Client 连接Linux 乱码
- SSH Secure Shell Client远程登录Linux
- About Linux & SSH(Secure Shell Client )
- SSH Secure Shell Client
- SSH Secure Shell Client
- ssh secure shell client
- ssh连接Linux超时自动断开
- 解决ssh链接服务器超时自动断开的问题
- SSH Secure Shell Client乱码
- ssh secure shell client 乱码
- linux2--ssh secure shell client
- *3
- 自定义 bar
- rails smtp config
- Android 获取闹钟引发的血案
- unary operator expected解决办法
- 如何避免SSH Secure Shell Client链接LINUX超时,自动断开?
- 利用开源软件架设中小型私有云存储系统【简要选型】
- 2013-2014 ACM-ICPC, NEERC, Southern Subregional Contest(2013区域赛练习)
- 求圆柱体的面积
- 不是技术牛人,如何拿到国内IT巨头的Offer
- js 得到两个时间之间为几个月和几天
- cocoa WebView使用注意事项
- VBA操作Excel小技巧
- oracle常用函数