Solved [Solved] Delay after login before password prompt in ssh?

Re: Delay after login before password prompt in ssh?

It's a DNS issue, the server will try to reverse resolve the IP address. If the server has no or a faulty DNS resolving you will get a delay.
 
Re: Delay after login before password prompt in ssh?

Hmm, odd, sometimes the gap is a couple of seconds, sometimes 30 seconds. It used to be consistently two seconds or less.
 
Re: Delay after login before password prompt in ssh?

Add an entry for that machine's hostname in /etc/hosts.
 
Re: Delay after login before password prompt in ssh?

michaelrmgreen said:
Hmm, odd, sometimes the gap is a couple of seconds, sometimes 30 seconds. It used to be consistently two seconds or less.
Check if your primary DNS server works all the time. If resolving through that one fails the system will try the second DNS entry. But this will cause a slight delay as the system has to wait for the first request to time-out. The request to the second server may succeed. If it also fails the delay will even be a little longer. This may account for the variation in timing you are witnessing.

Also check for IPv6. The client might try to use an IPv6 address, fail and fall-back to IPv4. This will also cause an annoying delay but this should only happen during the initial setup of the connection, before you get a login.
 
We have the same issue but we change the dnsuse to no even add the machine name in hosts file but didn't work.
please help me in this regards.
 
In file ssh_config set
Code:
VerifyHostKeyDNS no
This prevents SSHFP requests to DNS servers. If the DNS server does not find anything delays occur. This might also be regarded as leaking ssh usage when not configured properly.

In file sshd_config set
Code:
UseDNS no
prevents looking up the IP of a SSH-host, so in most cases there should be used "yes" unless you want to use IP numbers only.
 
In file ssh_config set
Code:
VerifyHostKeyDNS no
This prevents SSHFP requests to DNS servers. This is causing the delay if the DNS server does not find anything. This might also be regarded as leaking ssh usage when not configured properly.

In file sshd_config set
Code:
UseDNS no
prevents looking up the IP of a SSH-host, so in most cases there should be used "yes" unless you want to use IP numbers only.
Thank you Mr Getopt
you solve our issue raised 2 months ago .
 
Back
Top