保持ssh会话不掉线

客户端:

sudo vim /etc/ssh/config  之类的文件名

添加:

ServerAliveInterval 20
ServerAliveCountMax 9999

服务器端:

sudo vim /etc/ssh/sshd_config  之类的文件名

ClientAliveInterval 60
ClientAliveCountMax 9999

猜你喜欢

转载自blog.csdn.net/eloudy/article/details/120465040