直接在服务器端修改: 修改server端的sshd_config文件

vi etc/ssh/sshd_config
ClientAliveInterval 60 #server 每隔60秒发送一次请求给client,然后client响应,从而保持连接。
ClientAliveCountMax 3 #server 发出请求后,客户端超过3次未响应,就断开。

然后还是会超时,最后悲剧地发现,忘记重启sshd了。

/etc/init.d/sshd restart

Ok,跟超时说88。 ============2015-03-18=========== 在DO买了个Vistual Server .安装的是CentOS7 64bit 上面的路径出不来了。用的是下面的命令

[root@foam /]# service sshd restart
Redirecting to /bin/systemctl restart sshd.service