Long Delay Before SSH Authentication
Posted on May 18th, 2007 in Sys Admin, Ubuntu | 3 Comments »
If you are experiencing a long, annoying delay when attempting to connect to a remote server via SSH – especially if you have recently noticed this problem after installing/upgrading Ubuntu Feisty – try commenting out the “GSSAPIAuthentication yes” line in your /etc/ssh/ssh_config file:
File: /etc/ssh/ssh_config
…
HashKnownHosts yes
# GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
…
GSSAPIAuthentication specifies whether user authentication based on GSSAPI is allowed. Connections with GSSAPIAuthentication option enabled on non-kerberos SSH servers are very slow. If you run ssh in verbose mode you may get a “Miscellaneous failure” error message.
ssh -v -l
…
debug1: Miscellaneous failure
No credentials cache found
…
After disabling GSSAPIAuthentication, you probably won’t have to wait as long to get your login in prompt.
3 Responses
Oh, man. THANK YOU! ‘Twas so annoying!
I did this, but I still see a 15 sec delay trying to reach a Ubuntu 8.10 machine whereas it is only 7 sec to reach a Ubunto 8.04 or Debian 5. Any other potential slow spots with the default install?
Thanks for the tip.
If you don’t have root access or don’t want to edit the main config file, you can also edit your $HOME/.ssh/config to include:
Host *
GSSAPIAuthentication no
Put this at the bottom of the file. This should have the same effect.