SSH登录Vmware虚拟机Linux服务器慢问题

现象:

每次通过ssh登录机器都特别慢,大约30秒,甚至更长

环境:

  • OS:CentOS-7-x86_64-Minimal-2009.iso
  • 虚拟机平台:VMware® Workstation 16 Pro
  • 虚拟机平台版本:16.2.3 build-19376536

解决:

vim /etc/ssh/sshd_config
# 找到UseDNS yes,打开注释,并设置为no
UseDNS no
# 重启sshd_server
systemctl restart sshd
This entry was posted in 小技巧. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.