Saturday, 1 September 2012

SSH Delay Troubleshooting



SSH Delay Troubleshooting Method:

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 Yes

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.

No comments:

Post a Comment