Linux – ssh + along delay after typing the password between win to linux

linuxsshunixwindows

I installed two Linux machines with Linux version – 5.5.1.0-01

Something is very strange
if I perform ssh between Linux to Linux after I type the password I get the prompt of the second Linux machine without any delay

But if I perform ssh from window VIA (putty/reflection) to the Linux machines , after I type the password I have a long delay like 6 seconds

so please advice why I get delay when I connect to linux machine from windows

and I not get any delay when I perform ssh between Linux machines

Remark
I have two Linux machine – 5.5 version + PC with windows XP all machines connected to the switch with 1G speed

Best Answer

The main cause of that sort of delay in ssh is DNS resolution of the client. On the ssh server, can you not do a reverse lookup of the Windows client machine's IP address? Does the same lookup work for the Linux clients?

If that's the case, add the following line to the /etc/ssh/sshd_config of the server to disable the DNS lookup of the IP address:

UseDNS no

You can also take a look at the OpenSSH FAQ entry for this sort of problem: http://www.openssh.org/faq.html#3.3