如何防止ssh隧道中断

上网、浏览、聊天、下载等
回复
xhsh
帖子: 318
注册时间: 2007-06-21 2:52

如何防止ssh隧道中断

#1

帖子 xhsh » 2015-11-08 1:16

用ssh建立的隧道,过一段时间就会中断,我也在服务器上的/etc/ssh/sshd_config里添加了
ClientAliveInterval 30
ClientAliveCountMax 3

让服务器每隔30秒联系我的电脑,以使一直处于连接状态。但还是过一段时间就中断。在自己的电脑的/etc/ssh/ssh_config中也添加了
ServerAliveInterval 60
ServerAliveCountMax 3

都没用,请问大家有什么好办法,防止隧道或者ssh连接中断?谢谢。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 如何防止ssh隧道中断

#2

帖子 poloshiao » 2015-11-08 7:38

/etc/ssh/ssh_config
http://scottlab.ucsc.edu/~wgscott/xtal/ ... onnections
How to avoid interrupted connections
~/.ssh/config

http://superuser.com/questions/37738/ho ... unnel-open
How to reliably keep an SSH tunnel open?

http://shapeshed.com/prevent_your_ssh_c ... _freezing/
Prevent your SSH connection from freezing

http://askubuntu.com/questions/127369/h ... connection
How to prevent “Write Failed: broken pipe” on SSH connection?
silenc1
帖子: 1
注册时间: 2010-08-22 10:31

Re: 如何防止ssh隧道中断

#3

帖子 silenc1 » 2015-12-27 14:30

用screen?
回复