保持SSH连接

修改SSH配置文件

使用有root权限的用户执行 vim /etc/ssh/sshd_config,修改以下内容后保存

ClientAliveInterval 60
ClientAliveCountMax 3

重启SSH服务

systemctl restart sshd