Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 "192.168.56.1"
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.

add comment

1 Answer 1

up vote 6 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
show 1 more comment

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