I just installed Ubuntu 11.10, and whenever I try to SSH into my servers it's very slow. Before it displays the password prompt, it can take between 40 seconds and 60 seconds.

I use:

ssh myuser@myserver.com

Once I'm logged in, everything is fine and it works fast.

Why does it take so long, and how can i fix it? Are there any options in the SSH command I can use?

link|improve this question
feedback

1 Answer

up vote 18 down vote accepted

This is slow because the OpenSSH daemon uses DNS to run a reverse lookup on the client hostname to make sure it's valid

sudo vi /etc/ssh/ssh_config

Comment out the following lines

#GSSAPIAuthentication yes
#GSSAPIDelegateCredentials no

OR

add this:

UseDNS no
link|improve this answer
it works thanks – joel Nov 19 '11 at 23:02
you are very welcome – Book Of Zeus Nov 19 '11 at 23:03
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.