Back

linux - 让SSH保持不断线(自动重连),

发布时间: 2020-12-02 01:59:00

参考: https://www.cnblogs.com/chloneda/p/ssh-connect.html

vim /etc/ssh/ssh_config

增加下面2行

ServerAliveInterval 10
ServerAliveCountMax 999

即可。 (10秒钟心跳一次)

sudo service ssh restart

Back