linux ssh 默认没有开启心跳,所以很容易导致连接断开。
sudo vim /etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 3
一般还是建议在客户端设置。
sudo vim /etc/ssh/ssh_config
TCPKeepAlive yes
ServerAliveInterval 60
ServerAliveCountMax 3
如果这篇文章对你有所帮助,可以通过下边的“打赏”功能进行小额的打赏。
本网站部分内容来源于互联网,如有侵犯版权请来信告知,我们将立即处理。