# Huge delay when logging in via SSH

## bingobob

I've suddenly developed a 10 second delay after I login (i.e. after the "login as: " prompt and before the "Password: " prompt). Anyone got any ideas. Wierdly this problem seems to have occured around the same time as I swapped my SMC router for a linksys - but this may just be a huge co-incidence. These logins are from the LAN side, this is mucho annoying.

Anyone help ?

bb.

----------

## suidzero

I've seen delays like this if a machine is unable to determine it's own host name.  Maybe your system could resolve it's own name before but can't now.  Try putting an entry in /etc/hosts.

----------

## bingobob

that sounds like a very sensible suggestion...i will try now.

ta

----------

## bingobob

hmmm...dont think that is it unfortunately.

----------

## think4urs11

how about reverse dns resolution?

the machine where you want to connect to wants to (reverse) resolve the ip address the client has.

If this cannot be done and/or doesn't resolve to the same name an delay occurs.

(UseDNS in /etc/ssh/sshd_config)

----------

## bingobob

WOW ! You got it in one !  :Smile:  thanks...

I turned it on but that was the default....

So it turned it offf....restarted sshd...and that did it ...instant logins....

well done that man.

bb

----------

## bingobob

so this means reverse dns lookups are not working ?

can this pose other problems for me? (e.g. mutt takes a long time to open also)...

the new firewall on the new router has a different feature set - is this whats done it?

Is this the right setting "Block WAN Requests Block Anonymous Internet Requests" its turned on.

Still the firewall is just for the WAN side and the SSHD delay was from access on the LAN side.

bb

----------

## ||AvataR||

you can also solve this by putting the ip of a dns server in you /etc/resolve.conf (ask you ISP for their dns server)

so, if the dns-server's ip is xxx.xxx.xxx.xxx, then you put this in you /etc/resolve.conf:

```

nameserver xxx.xxx.xxx.xxx

```

Grtz,

Avi

----------

## oldnavy23

ok same problem  i have ssh takes more like 35 secs to go from login to password promt i did the useDNS  thing no luck still could be something eles but not soo sure anymore  its been slow since i redid my box

----------

