I've been noting recently that any host that I ssh to in LAN, waits like 5 seconds before asking for password.

ping sometimes also waits, but less(like 2 seconds), but it shows it has resolved the address correctly.

nslookup resolves very fast with my local dns.

Question is, how could I debug this?


In ssh, it has a delay between these lines:

debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
  • ssh -v -v -v might be a good start
    – thrig
    May 11, 2016 at 15:14
  • @thrig yes you are right, I missed it. I updated
    – JorgeeFG
    May 11, 2016 at 15:16
  • 2
    Sometimes this happens when the DNS on the remote system is slow at mapping the client's IP address to a FQDN. After you login to the remote system, try nslookup with your client's numeric IP address and see if that takes awhile. May 11, 2016 at 15:49

1 Answer 1


Use ssh -v on originating system, check /var/log/* on target. Try timing access by IP address as well as by hostname.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .