# /etc/ssh/sshd_config ClientAliveInterval 30 ClientAliveCountMax 5
ClientAliveInterval:每x秒发送一次请求,保持连接
ClientAliveCountMax:x次请求没有响应,自动断开
重启服务:
# systemctl restart sshd
# /etc/ssh/sshd_config ClientAliveInterval 30 ClientAliveCountMax 5
ClientAliveInterval:每x秒发送一次请求,保持连接
ClientAliveCountMax:x次请求没有响应,自动断开
重启服务:
# systemctl restart sshd