Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

This is a toss up between superuser and serverfault but I figure it's more a serverfaulty question.

I do development on a solaris box...

uname -a

SunOS sandbox 5.10 Generic_120011-14 sun4u sparc SUNW,UltraAX-i2

so I am constantly sshing to it via putty.

when I connect to it, I immediately get

Using username "stu".

Authenticating with public key "imported-openssh-key" from agent

and then it sits there for 10-20 seconds before I get my shell prompt. Never used to happen, only started recently since I've been screwing around with Xvnc, but I killed everything and I get no errors anywhere that I can find.

When I watch the /var/adm/messages file, I get this

May 15 14:16:10 sandbox sshd[15306]: [ID 800047] Accepted publickey for stu from port 3363 ssh2

and then a delay, and then I get my prompt. How can I find out what's going on that's taking so long for the shell to start?

share|improve this question

marked as duplicate by Iain May 15 '12 at 18:27

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.

These delays are often caused by reverse dns lookups taking a long time, or timing out. You don't say which sshd you are using, but in openssh, you could try UseDNS no in sshd_config on the server and see if that eliminates the delay. If that is the case, you may leave it that way, or figure out why exactly the reverse DNS is causing problems, which could be the indication that the server has a general DNS problem, or that there is a problem specifically with looking up the PTR for your address.

share|improve this answer
definitely worth looking into, thanks. – Stu May 15 '12 at 18:27
not openssh, must be solaris' flavor. it didn't like that option. Not having much luck finding the equivalent in solaris sshd. – Stu May 15 '12 at 19:00
LookupClientHostnames no VerifyReverseMapping no – Stu May 15 '12 at 19:02
found it. didn't help. :-( – Stu May 15 '12 at 19:02

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