前一段时间装了一个RHEL。但是发现不管是telnet 还是ssh都登陆很慢,这让我很郁闷,在网上找了很久,终于找到了,将文件/etc/resolv.conf里面的DNS服务注释了就好了。这也可能是在虚拟机上没有DNS的原因吧。

[root@leshy ~]# cat /etc/resolv.conf
#nameserver 200.1.1.1
[root@leshy ~]#

网上高人的回复原因是:

Its your /etc/resolv.conf
i bet if u go to the comp in a web browser its instant, yeah? why? because your PC doesnt do a reverse DNS lookup on ur IP then... when u telnet/ftp into ur linux box, it'll do a dns lookup on you, to see who you are, if u either correct the settings in the /etc/resolve.conf file, or just back it up, then delete the contents all together, it should be fine !

我猜原因就是当有登陆就去DNS去找相应信息,直至超时返回。将DNS信息删了,就可以正常。


Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐