# sshd funny wait before login prompt on client side



## icecoke (Dec 30, 2012)

Hi everyone!

I'm running a sshd inside a jail and have the funny behavior, that it takes nearly exact 30sec before I get the login prompt on the client side after I init a connect to this jail.
This is the content of the debug.log on the server


```
Dec 30 19:47:24 testvs sshd[43974]: debug1: fd 4 clearing O_NONBLOCK
Dec 30 19:47:24 testvs sshd[43974]: debug1: Forked child 43990.
Dec 30 19:47:24 testvs sshd[43990]: debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
Dec 30 19:47:24 testvs sshd[43990]: debug1: inetd sockets after dupping: 3, 3
Dec 30 19:47:24 testvs sshd[43990]: debug1: res_init()
Dec 30 19:47:24 testvs sshd[43990]: debug1: HPN Disabled: 0, HPN Buffer Size: 65536
Dec 30 19:47:24 testvs sshd[43990]: debug1: Client protocol version 2.0; client software version OpenSSH_5.6
Dec 30 19:47:24 testvs sshd[43990]: debug1: match: OpenSSH_5.6 pat OpenSSH*
Dec 30 19:47:24 testvs sshd[43990]: debug1: Remote is not HPN-aware
Dec 30 19:47:24 testvs sshd[43990]: debug1: Enabling compatibility mode for protocol 2.0
Dec 30 19:47:24 testvs sshd[43990]: debug1: Local version string SSH-2.0-OpenSSH_5.8p2_hpn13v11 FreeBSD-20110503







Dec 30 19:47:55 testvs sshd[43990]: debug1: PAM: initializing for "admin"
Dec 30 19:47:55 testvs sshd[43990]: debug1: PAM: setting PAM_RHOST to "vvvv.www.xxx.yyy"
```

It seems like PAM is going to get a pizza each time I log in, but I have no idea why. But it's taking allways 30sec, so I'm not willing to believe in just a slow something, but a setting that causes this.

Any help is welcome! If you need more infos, etc., please let me know!

thanks!
Jimmy


----------



## wblock@ (Dec 30, 2012)

A 30-second delay almost always means a DNS timeout.


----------



## HarryE (Dec 30, 2012)

Try

```
UseDNS  no
```
in /etc/ssh/sshd_config. *sshd restart* needed!


----------



## icecoke (Dec 30, 2012)

OMG!!! Thank you both a lot!!

I obviously need to have some sleep...
My resolv.conf was a mess on this jailed host. After tweaking it, it works like a charme!


----------

