Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (24 sloc) 546 Bytes
layout title key tags category date
article
centos7ssh连接超时断开解决
centos-ssh
nginx配置
网站建设
2019-12-24 12:30:00 +0800

用Mac终端ssh连接centos7服务器连接时间很短就会断开,修改其配置文件,连接后自动发送心跳就不容易断开。

操作如下:

vim打开/etc/ssh/sshd_config文件找到

#ClientAliveInterval 0
#ClientAliveCountMax 3

修改为

ClientAliveInterval 60
ClientAliveCountMax 3

修改完后重启sshd

systemctl restart sshd
You can’t perform that action at this time.