服务器端配置
修改/etc/ssh/sshd_config
TCPKeepAlive yes ClientAliveInterval 60
客户端配置
修改/etc/ssh/ssh_config
TCPKeepAlive yes ServerAliveInterval 60