ssh超时断开的解决办法
2012-06-11 11:15
162 查看
1、echo $TMOUT
如果显示空白,表示没有设置, 等于使用默认值0, 一般情况下应该是不超时. 如果大于0, 可以在如/etc/profile之类文件中设置它为0.
Definition: TMOUT: If set to a value greater than zero, the value is interpreted as the number of seconds to wait for input after issuing the primary prompt. Bash terminates 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表示服务器发出请求后客户端没有响应的次数达到一定值,
就自动断开. 正常情况下, 客户端不会不响应.
如果显示空白,表示没有设置, 等于使用默认值0, 一般情况下应该是不超时. 如果大于0, 可以在如/etc/profile之类文件中设置它为0.
Definition: TMOUT: If set to a value greater than zero, the value is interpreted as the number of seconds to wait for input after issuing the primary prompt. Bash terminates 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表示服务器发出请求后客户端没有响应的次数达到一定值,
就自动断开. 正常情况下, 客户端不会不响应.
相关文章推荐
- SSH 链接服务器超时自动断开问题解决办法
- SSH 超时断开连接解决办法
- SSH 超时断开连接解决办法
- SSH 超时断开连接解决办法
- SSH超时断开连接的解决办法
- 解决ssh超时断开连接的问题
- SSH Client 会话空闲超时的解决办法
- Linux ssh远程连接断开问题处理办法解决
- ssh超时断开的解决方法
- SSH超时自动断开问题解决
- Linux下SSH远程连接断开后让程序继续运行解决办法
- 解决ssh超时断开连接的问题
- Linux下SSH远程连接断开后让程序继续运行解决办法
- 解决:Linux SSH Secure Shell(ssh) 超时断开的解决方法
- Ubuntu ssh频繁断开解决办法
- linux:解决SSH连接Linux超时自动断开
- ssh超时断开的解决方法
- SSH 连接超时解决办法
- ssh超时断开的解决方法
- 如何解决SSH连接Linux超时自动断开?