ssh 的服务端在连接时会自动检测 dns 环境是否一致导致的,修改为不检测即可,操作如下: 修改文件: /etc/ssh/sshd_config UseDNS yes ---> 默认为注释行 UseDNS no ---> 把注释打开,改为 no ,然后重启 ssh 服务即可 直接执行 /etc/rc.d/init.d/ssh restart 或者 sevice ssh restart /etc/init.d/sshd restart restart 包括了 stop , start 。 [root@node4 ~]# /etc/init.d/sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ] [root@node4 ~]# 如果是linux 7的话 [root@mysqlcentos01 ~]# systemctl restart sshd [root@mysqlcentos01 ~]# 果然快了很多 /etc/nsswitch.conf hosts 把dns删除 来源: CSDN 作者: EVISWANG 链接: https://blog.csdn.net/EVISWANG/article/details/49964247