怎样将SSH设置为一直连接(不断线)
-
- 帖子: 25
- 注册时间: 2016-02-06 21:54
- 系统: Windows 7
怎样将SSH设置为一直连接(不断线)
ubuntu的SSHD默认是如果客户端长时间不操作SSH就会自动断线,很麻烦。
- vickycq
- 帖子: 4507
- 注册时间: 2011-03-20 13:12
- 系统: Debian
- 来自: 山东省寿光县
- 联系:
Re: 怎样将SSH设置为一直连接(不断线)
检查服务器 sshd_config 的 ClientAliveInterval, TCPKeepAlive 参数
检查客户端 ssh_config 的 ServerAliveInterval, TCPKeepAlive 参数
检查所用 shell 的自动登出设置,如 bash 的 TMOUT,csh 的 autologout
参考
http://serverfault.com/questions/278396 ... -on-ubuntu
https://docs.oseems.com/general/applica ... le-timeout
http://www.cyberciti.biz/faq/appleosx-b ... ash-shell/
检查客户端 ssh_config 的 ServerAliveInterval, TCPKeepAlive 参数
检查所用 shell 的自动登出设置,如 bash 的 TMOUT,csh 的 autologout
参考
http://serverfault.com/questions/278396 ... -on-ubuntu
https://docs.oseems.com/general/applica ... le-timeout
http://www.cyberciti.biz/faq/appleosx-b ... ash-shell/
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
欢迎所有 Debian GNU/Linux 用户
-
- 帖子: 893
- 注册时间: 2011-02-14 17:46
Re: 怎样将SSH设置为一直连接(不断线)
如果是挂代理用的,试试autossh
-
- 帖子: 25
- 注册时间: 2016-02-06 21:54
- 系统: Windows 7
Re: 怎样将SSH设置为一直连接(不断线)
Sshd_config加TCPKeepAlive yes,ClientAliveInterval 120,ClientAliveCountMax 5000也是一样,无操作过大约10分钟后自动断线。vickycq 写了:检查服务器 sshd_config 的 ClientAliveInterval, TCPKeepAlive 参数
检查客户端 ssh_config 的 ServerAliveInterval, TCPKeepAlive 参数
检查所用 shell 的自动登出设置,如 bash 的 TMOUT,csh 的 autologout
参考
http://serverfault.com/questions/278396 ... -on-ubuntu
https://docs.oseems.com/general/applica ... le-timeout
http://www.cyberciti.biz/faq/appleosx-b ... ash-shell/
-
- 帖子: 893
- 注册时间: 2011-02-14 17:46
Re: 怎样将SSH设置为一直连接(不断线)
有些参数是服务器上/etc/ssh/sshd_config中的
有些是客户端~/.ssh/config中的
不要搞混了
有些是客户端~/.ssh/config中的
不要搞混了