今天发现用xshell连接centos太慢,网上查询后发现是因为ssh的服务端在连接时会自动检测dns环境是否一致导致的,修改为不检测即可。
修改文件位置:vi /etc/ssh/sshd_config
把#UseDNS yes
修改为UseDNS no
然后,重启ssh服务
systemctl restart sshd
再次连接,秒连
done!