Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have 2 servers, A & B, both running CentOS 5.7.

If I ssh using Putty from Windows 7 to server A or B, the password prompt is quick

But if I ssh from Ubuntu 11.10 to server A, the password prompt takes a long time, almost 2 minutes; while server B password prompt is quick, though not as quick as using Putty.

htw@htw-HP-ProBook-4421s:~$ time ssh [email protected]
[email protected]'s password: 
Connection closed by A.biz

real    2m33.170s

htw@htw-HP-ProBook-4421s:~$ time ssh [email protected]
[email protected]'s password: 

real    0m1.904s

There shouldn't be anything wrong with both servers since ssh-ing from Win 7 is quick. The puzzling bit is logging onto server B is faster than onto server A using Ubuntu. Both servers sshd.conf are already set to UseDNS=no

How do I debug this?

share|improve this question
1  
Run ssh -vvv [email protected]. Post the output (obscure IP addresses for privacy), indicating where there's a delay. –  Gilles Feb 15 '12 at 5:59

1 Answer 1

The most common cause for this is

GSSAPIAuthentication yes

in /etc/ssh/ssh_config. If you are not using this as an authentication method, setting

GSSAPIAuthentication no

will speed up your ssh client.

You can also change this for just your user by setting up a personal configuration in ~/.ssh/config but if you are the only user on the system, or all users will benefit, then setting it in /etc/ssh/ssh_config is fine.

See man ssh_config for more information on setting up your ssh client.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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