Solution to fix SSH Login delay on Linux

slow ssh login, ssh login takes long time, slow ssh login to server, Delay before password prompt over ssh, putty login delay, Fixing SSH login long delay, How to fix a slow SSH login issue on Linux, Fix slow password prompting when doing SSH logins, ubuntu ssh slow, ssh slow typing, ssh slow to connect, ssh slow response, Why does ssh's “password” prompt take so long to appear, delay to get password prompt when ssh, SSH Slow to Prompt for password, delay for password prompt over ssh, vi /etc/ssh/sshd_config, usedns yes, usedns no, service sshd reload, systemctl reload sshd

Fix to Solve SSH Login delay on Linux

We may came across the situation that very long delay when we login to the server using SSH,
               - Connection will be taking a fraction of second
               - After/While entering the Password its taking more time to provide the shell prompt.
Here is a solution to fix this issue, this is related to DNS. We have to change dns related entries in ssh config file to reduce this delay.

Note : 
     Be careful when doing this on production servers.
     This activity may disconnect all the users from the system who are logged in to that machine using SSH.

By default UseDNS option in this file is disable. We have to uncomment this option and then edit this entry to no. As below..
[root@linux1 ~]# vi /etc/ssh/sshd_config
Just search for UseDNS..
[root@linux1 ~]#UseDNS yes
Change that to, (Simply Uncomment it)
UseDNS no
save and exit the file and then just reload ssh service to take effect what ever changes we did..
[root@linux1 ~]# service sshd reload
[root@linux1 ~]# systemctl reload sshd
Now try to login and observe, delay will be fixed.

Leave your comments if any, we appreciate your feedback.
Subscribe us on youtube channel for practical video tutorials and follow us on social networking sites to not miss any updates.
November 06, 2015

Post a Comment


Contact Form


Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget