vi /etc/ssh/sshd_config
客户端不操作自动断开设置TCPKeepAlive yesClientAliveInterval 180ClientAliveCountMax 20service sshd restart