Sharing Knowledge | System Admin Articles

Delay in SSH Login Prompt

You may came across this situation. At the time of logging in the shell prompt using SSH, 

               - Connection will be taking a fraction of second
               - After/While entering the Password its taking more time to provide the shell prompt.
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.. 

# vi /etc/ssh/sshd_config 

Just search for UseDNS.. 

                     #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.. 

# service sshd reload
Now try to login and observe, delay will be reduced.

Please post your comments on this..

Labels: Quick HOWTO, SSH

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

0 Comments for "Delay in SSH Login Prompt"

What do you think about this Article? Add your Opinion..!

Back To Top