解决xshell连接Linux服务器慢的问题

    在日常使用xshell6连接centos时会发现链接速度很慢,有些时候就比较急人。这种情况主要是因为xshell在连接centos时使用了DNS解析,我们只需关掉DNS解析就可以了。

  • 打开ssh配置文件
    1
    [root@centos7 ~]#vi /etc/ssh/sshd_config
  • 在文件内搜索UseDNS这一行,讲yes改为no。
    1
    2
    3
    4
    5
    6
    7
    115 UseDNS no
    116 #PidFile /var/run/sshd.pid
    /UseDNS
    ```
    * 重启sshd服务
    ```bash
    [root@centos7 ~]#systemctl restart sshd.service