修改sshd_config解决 xshell 链接 linux 错误 connection closed by foreign host

来源:互联网 发布:阿里云虚拟主机装软件 编辑:程序博客网 时间:2024/04/28 13:49

用xshell连接服务器总是报错 connection closed by foreign host,害的我一个程序每次都跑到一半


解决方案是:    


sudo vim /etc/ssh/sshd_config
添加两行:
ClientAliveInterval 60
ClientAliveCountMax 3
sudo /etc/init.d/ssh restart
0 0
原创粉丝点击