vim /etc/ssh/sshd_config
1、找到下面两个配置
#ClientAliveInterval 0
#ClientAliveCountMax 3
客户端每隔多少秒向服务发送一个心跳数据
客户端多少秒没有相应,服务器自动断掉连接
修改为
ClientAliveInterval 30
ClientAliveCountMax 86400
2、重启sshd服务
service sshd restart
vim /etc/ssh/sshd_config
1、找到下面两个配置
#ClientAliveInterval 0
#ClientAliveCountMax 3
客户端每隔多少秒向服务发送一个心跳数据
客户端多少秒没有相应,服务器自动断掉连接
修改为
ClientAliveInterval 30
ClientAliveCountMax 86400
2、重启sshd服务
service sshd restart