LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   slow ssh response after upgrate to ubuntu 7 (https://www.linuxquestions.org/questions/linux-general-1/slow-ssh-response-after-upgrate-to-ubuntu-7-a-547665/)

xafwodahs 04-20-2007 02:29 PM

slow ssh response after upgrate to ubuntu 7
 
Hi, I have a PC which was running Ubuntu 6 and I use PuTTY on a Windows box to ssh telnet into the linux machine. This has worked fine.

Now, I upgraded to Ubuntu 7, and now when I ssh in via Putty, the login takes about 5-6 seconds before I get the password prompt. I have PuTTY configured to specify the username, so I see:

Using username "xyz"

immediately (I don't know if that ssh or putty printing that...)

and then about 5-6 seconds later, I get the password prompt.

This is annoying to me because I routinely open/use/close these telnet sessions on a rapid basis.

How can I log the ssh login process to see what's causing the delay?

Any help would be appreciated.

Note: I did not change my PuTTY configuration, so it must be something related to the new Ubuntu that's causing the delay. Also, if I just type "ssh localhost" from the linuxpc itself, I don't see the delay. Also, from my windows pc, I can ping the linux pc with a turn around time of 0.02 seconds, so the basic connection is fine.

acid_kewpie 04-20-2007 03:42 PM

only thing that routinely casuses these kinds of delays are reverse dns lookups. can the server find the hostname of the client you're connecting from?

xafwodahs 04-23-2007 11:18 AM

I installed wireshark on the linux pc and did a capture of this time period.

I see some ssh init, key exchange, diffie-hellman somethingorother, and encryped response packet all within .15 seconds.

Then there is: (time proto info) [time ref is first ssh message]
0.15 DNS "Standard query PTR <windows_ip>.in-addr.arpa"
0.15 DNS "Standard query response, No such name"
0.25 MDNS "Standard query PTR <windows_ip>.in-addr.arpa"
1.26 MDNS "Standard query PTR <windows_ip>.in-addr.arpa"
3.26 MDNS "Standard query PTR <windows_ip>.in-addr.arpa"
5.15 SSHv2 Encrypted response packet

I'm not terribly familiar with reverse DNS - is that what this is? It seems after the first DNS failed, then it tried multicast DNS whatever that is - apparently with no response.

What would cause this and how to do fix it?

Thanks.

nx5000 04-23-2007 11:23 AM

The server tries to get the name out of the IP (DNS ptr).

You should try to reconfigure the ftp server so that it doesn't do this anymore.

acid_kewpie 04-23-2007 02:34 PM

he shoots... he scores! right so either look at setting up a local dns server (very very easy with dnsmasq), add details to /etc/hosts on the server machine so they know who the client is, or set UseDNS=NO in your sshd_config file

nx5000 04-24-2007 05:20 AM

Quote:

Originally Posted by acid_kewpie
he shoots... he scores!

This one was easy, you won't get a free beer for this ;)

xafwodahs 04-24-2007 12:45 PM

"UseDNS no" worked fine. Thx much!


All times are GMT -5. The time now is 01:52 PM.