vi /etc/ssh/sshd_config
找到下面两行配置项:
#ClientAliveInterval 0
#ClientAliveCountMax 3
//客户端每隔多少秒向服务发送一个心跳数据
ClientAliveInterval 30
//客户端多少秒没有相应,服务器自动断掉连接
ClientAliveCountMax 300
重启 sshd 服务:
service sshd restart
转载请注明:微刻 blog.wecot.cn » 阿里云服务器 ssh 登录超时更改