阿里云SSH服务器保活

修改配置文件

vi /etc/ssh/sshd_config

增加

ClientAliveInterval  60  #every 60s send requirement message to client,wait response
ClientAliveCountMax  10  #auto disconnect when client dont response more than ten times

然后重启ssh服务

root@MDaliyun ~ # systemctl restart sshd
root@MDaliyun ~ # systemctl status sshd

Leave a Reply

Your email address will not be published. Required fields are marked *