操作目的:
让Linux系统连接SSH的时候不再自动断线。
操作办法:
1.在 /etc/ssh/ssh_config 和 /etc/ssh/sshd_config末尾都加上以下代码:
TCPKeepAlive yes
ClientAliveInterval 5
ClientAliveCountMax 3
2.重启SSHD服务
systemctl reload sshd
或
systemctl restart sshd
3.大功告成,继续你的生活吧
让Linux系统连接SSH的时候不再自动断线。
1.在 /etc/ssh/ssh_config 和 /etc/ssh/sshd_config末尾都加上以下代码:
TCPKeepAlive yes
ClientAliveInterval 5
ClientAliveCountMax 3
2.重启SSHD服务
systemctl reload sshd
或
systemctl restart sshd
3.大功告成,继续你的生活吧