(20200304已解决)Xshell连接阿里云服务器经常断掉

  • 解决方案一

    在阿里云服务器上,

    1. vim /etc/ssh/sshd_config
      #ClientAliveInterval 0
      #ClientAliveCountMax 3
      改为
      ClientAliveInterval 30
      ClientAliveCountMax 86400
      

      这两行的意思是,客户端每隔30秒向服务端发送一个心跳数据;

      客户端86400秒没响应,服务端自动断掉连接。

    2. service sshd restart
  • Reference

  1. 阿里云服务器ssh经常一段时间就断掉解决办法
发布了800 篇原创文章 · 获赞 1155 · 访问量 72万+

猜你喜欢

转载自blog.csdn.net/The_Time_Runner/article/details/104656161