it takes a long long long time to time-out a login attempt

Vasil Dimov vd at datamax.bg
Tue Mar 23 23:59:14 PST 2004


> I'm trying to ssh into my FreeBSD (5.2.1-release sparc version) box from my
> desktop, however, it'll take a few seconds for the "login as" prompt to
> appear.  I enter my the user name and hit enter. the login attempt then sits
> there for about 90 seconds w/o asking for the password, then the connection
> times out.
> 
> Any ideas what's causing this?  Do I need to put the workstation's
> information into the hosts file or something?
> 
> The funny thing is that when I ssh from another server that's on the same
> VLAN as the FreeBSD box (I should mention that the workstation is on a
> different VLAN) the login process happens immediately.
> 
> Any ideas what gives?

sshd is trying to reverse map the addres client is coming from and no responze
is returned back by the nameserver.

the "login as: " prompt is given by the client prog without even talking to
the sshd server - that's why it comes to you in a few seconds.

Try the following:
1. add hosts(5) entry in the server's hosts file for the client ip address
2. write the following in /etc/nsswitch.conf:
hosts: files [unavail=return] dns

NOTE: "hosts: files dns" should also do the work, but it does not.
see: "getnameinfo(3) called from sshd finds error in /etc/hosts?" in
freebsd-questions@ I am still digging to find the answer.


More information about the freebsd-questions mailing list