Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
ssh delay when connecting

I have a Scientific Linux virtual guest running out of Virtualbox 4.0.4 on an Ubuntu 11.04 machine.

When I SSH from the host to the guest, there's always a 10 second pause while the public key is apparently validated.

On the client side, I see:

debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
----10 second pause----
debug1: Server accepts key: pkalg ssh-rsa blen 149

which corresponds to the following on the server:

Jul 11 20:53:05 localhost sshd[4275]: debug1: userauth-request for user ****** service ssh-connection method publickey
Jul 11 20:53:05 localhost sshd[4275]: debug1: attempt 1 failures 1
Jul 11 20:53:05 localhost sshd[4275]: debug1: test whether pkalg/pkblob are acceptable
----10 second pause----
Jul 11 20:53:15 localhost sshd[4272]: debug1: PAM: setting PAM_RHOST to ""
Jul 11 20:53:15 localhost sshd[4272]: debug1: PAM: setting PAM_TTY to "ssh"
Jul 11 20:53:15 localhost sshd[4272]: debug1: temporarily_use_uid: 500/500 (e=0/0)

Any ideas why the long delay? Once connected the sessions run fine, without any lags or hangings.

share|improve this question

marked as duplicate by mattdm, Iain Dec 1 '12 at 19:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 7 down vote accepted

You may have an issue with reverse-DNS. Is the host you're connecting to resolving your source IP?

share|improve this answer
D'ya think? I'd (perhaps naively) assumed DNS wouldn't get involved on a 192.168 connection. – mjk Jul 11 '11 at 19:25
I think it does actually – Lucas Kauffman Jul 11 '11 at 19:48
Dang! You were right. Adding a mapping in /etc/hosts fixed this. Cheers. – mjk Jul 11 '11 at 20:05
I have the same problem and I'm SURE it's not caused by DNS. I have a working DNS infrastructure, and disabling all DNS options makes no difference. – MarkR Nov 28 '12 at 17:33
@mjk: How would it KNOW that it's a 192.168 connection before it's used DNS? – MarkR Nov 28 '12 at 17:45

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