Operating System - Linux
1823376 Members
2456 Online
109654 Solutions
New Discussion юеВ

ssh delay about 16 seconds

 
Maaz
Valued Contributor

ssh delay about 16 seconds

ssh client OS: rhel 4
ssh server OS: rhel 4

I ssh my "ssh server", it takes almost 12 seconds before getting the promt(password prompt) back.
#ssh 10.0.0.5
<12 seconds wait>
root@10.0.0.5's password:

I did 'ssh -v 10.0.0.5' and found that the cause of delay(of abt 12 secs) is "Authentication Method".

excerpt from 'ssh -v 10.0.0.5'
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: password
root@10.0.0.5's password:

plz help
Regards

5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: ssh delay about 16 seconds

To identify if it's a DNS reverse lookup problem, configure:

/etc/ssh/sshd_config

UseDNS no
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: ssh delay about 16 seconds

Forgot to say that you need to reload the service:

service sshd reload
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Maaz
Valued Contributor

Re: ssh delay about 16 seconds

I simply comment and delay gone
GSSAPIAuthentication yes
to
#GSSAPIAuthentication yes

Thanks anyway
Regards
Andre Lejeune
New Member

Re: ssh delay about 16 seconds

I had a similar problem and disabling DNS worked.
Siert Zijl
Advisor

Re: ssh delay about 16 seconds

The server is unable to resolve the IP address you are coming from.

Make sure reserve DNS is working correctly or put your source IP address and hostname in the /etc/hosts file.

If the server does resolve correctly, please check how long it takes to do the reserve DNS lookup (command: dig ipaddress).

If you don't need resolving at all, disable DNS lookups in /etc/ssh/sshd_config "UseDNS no" as others preferred before.
Linux system administrator