Thursday, March 3, 2016

[SSH- CentOS/ RedHat]: How To Fix: Why SSH Login Takes Long Time to Ask for Password in Redhat Or CentOS

How To Fix: Why SSH Login Takes Long Time to Ask for Password in Redhat Or CentOS


Step 1: Login to Linux machine as a root user. 
[root@linuxsrv ~]#
[root@linuxsrv ~]# cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bkp2015
[root@linuxsrv ~]# sed -i ‘s/#UseDNS yes/UseDNS no/g’ /etc/ssh/sshd_config
[root@linuxsrv ~]# grep -i dns /etc/ssh/sshd_config
UseDNS no
Step 2: Restart sshd service.
[root@linuxsrv ~]# service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[root@linuxsrv ~]#
[root@linuxsrv ~]#
Step 3:Test the login speed.
[root@linuxsrv ~]# ssh localhost
Warning: Permanently added ‘localhost’ (RSA) to the list of known hosts.
Last login: Thu Oct 8 17:29:57 2015 from 172.10.20.30
[root@linuxsrv ~]#
The above steps helped me to resolve ssh slowness issue, surely it will be helpful for you too if you facesimilar issu

No comments: