ssh连接慢解决办法(亲测成功)

ssh连接慢解决办法(成功)

用真机连接虚拟机卡的话:

1.进入虚拟机vim /etc/ssh/sshd_config

2.将  #UseDNS yes改为UseDNS no即可如下:

使用/UseDNS找到地方然后添加

#UseDNS yes

UseDNS no

#PidFile /var/run/sshd.pid

  1. systemctl restart sshd

[root@foundation21 network-scripts]# ssh [email protected]

[email protected]'s password:

#速度非常可以,成功

如果是虚拟机ssh连接真机慢的话:

操作将上述操作在真机上操作一遍

注意:/etc/hosts文件无关,不要乱动

在被连接的机子上进行上述配置即可(进行了改配置的机子别人连起来都很快)

 

发布了150 篇原创文章 · 获赞 2 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_43309149/article/details/104345854