解决centos7 ssh连接慢的问题

有时候ssh远程连接服务器,会显示以下内容,并且卡在那里,要过好几分钟才进到linux系统中:

Connecting to 192.168.1.2:22...

Connection established.

To escape to local shell, press 'Ctrl+Alt+]'.

查了相关资料,发现在ssh的配置文件的一个参数在起作用,

vi /etc/ssh/sshd_config

将#UseDNS yes

改为 UseDNS no

重启ssh即可解决

service sshd restart

猜你喜欢

转载自my.oschina.net/u/3771618/blog/1618806