linux 1.进入ssh目录 cd /etc/ssh 2.修改配置文件sshd_config ClientAliveInterval 30 ClientAliveCountMax 86400 3.重启ssh服务 service sshd restart