Xshell频繁断连,远程桌面频繁断连怎么办?

108 阅读1分钟

q## ssh连接的好好的突然出现 Socket error Event: 32 Error: 10053.导致 Xshell 进程断开。

Connection established.  
To escape to local shell, press 'Ctrl+Alt+]'.  
Socket error Event: 32 Error: 10053.  
Connection closing...Socket close.  
Connection closed by foreign host.  
Disconnected from remote host(阿里云-47.97.223.189) at 20:43:33.  
Type `help' to learn how to use Xshell prompt.

常见问题与解决方式

  1. 服务器端设置

    sudo vim /etc/ssh/sshd_config
    # 进入文件后设置:
    ClientAliveInterval 300
    ClientAliveCountMax 3
    
    

    image.png

  2. 服务器网络ip地址变化导致xshell自动断开连接。于是修改本机ip为固定地址发现就不会轻易断了。

    last
    

    image.png

  3. 修改完配置记得重新启动ssh

    systemctl restart sshd