解决ssh远程连接自动中断(Software caused connection abort)

在linux服务器端设置:

vi /etc/ssh/sshd_config

找到 TCPKeepAlive yes把前面的#去掉

找到ClientAliveInterval 参数去掉前面的#

ClientAliveInterval 60  把后面的0改成60

ClientAliveInterval指定了服务器端向客户端请求消息的时间间隔, 默认是0,不发送。而ClientAliveInterval 60表示每分钟发送一次,然后客户端响应,这样就保持长连接了。

另外,至于ClientAliveCountMax,使用默认值3即可。ClientAliveCountMax表示服务器发出请求后客户端没有响应的次数达到一定值,就自动断开,正常情况下,客户端不会不响应。

点赞
  1. Pokerdomded说道:
    Google Chrome Windows 10
    https://t.me/officials_pokerdom/3902
  2. LuckyBandit说道:
    Google Chrome Windows 10
    https://t.me/iGaming_live/4872

发表回复

电子邮件地址不会被公开。必填项已用 * 标注