客户端设置 ~/.ssh/config
Host *
ServerAliveInterval 40
服务端设置 /etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 3
客户端设置 ~/.ssh/config
Host *
ServerAliveInterval 40
服务端设置 /etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 3