# Slow login to a Redhat (ssh) server from Gentoo

## matomato76

Thanks in advance. 

I have 10 seconds delay to log in an old Redhat server from my Gentoo machine and others. I've tried some according to Google but they are not working. The server manager is VERY lazy. He will do rare on the server side.

Therefore, I should guess... I guessed it's DNS look up problem but it doesn't look like so. I've tried all of things in http://www.openssh.com/faq.html#3.3

Any of them works for me. If you have any ideas, please let me know. I am placing the detailed information below. Thank you.

I have two computers. One is my laptop, while the other is my desktop in my office. Aside from them, a Redhat server is running sshd. 

 On my laptop, I have windows7 + latest putty, Gentoo + openssh and Ubuntu(maybe, 9.10 or 10.04 as I remember). 

 I use the laptop at both of my home and my office.

 On my desktop at my office, I have Gentoo + openssh 5.8_p1-r1. 

Except Ubuntu on my laptop, all the other require 10 second delay for login to the Redhat server via ssh. 

I have no access to the ssh server. Thus, I can't provide the server's log messages. The messages from the client, my Gentoo(openssh 5.8_p1-r1) tells as follows. 

 *Quote:*   

> 
> 
>   OpenSSH_5.8p1-hpn13v10, OpenSSL 1.0.0e 6 Sep 2011
> 
> debug1: Reading configuration data /etc/ssh/ssh_config
> ...

 

The server manager put the IP address of my desktop(static) to the /etc/hosts. But there was no change.

Then, I asked to turn off the "UseDNS" option in the sshd_config file. I don't know whether he restarted sshd but.. nslookup MY_COMPUTERS on the server and nslookup THE_REDHAT_SERVER works with no delay. 

Moreover, I can connect different servers from my laptop or the desktop. My desktop is also a ssh server(Gentoo, amd64, openssh 5.8_p1-r1). I can access a completely different server. I don't have any significant delay with all of them. 

This is my desktop

Linux localhost 3.1.4-gentoo #3 SMP PREEMPT Fri Dec 2 17:04:46 PST 2011 x86_64 Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz GenuineIntel GNU/Linux

OpenSSH_5.8p1-hpn13v10, OpenSSL 1.0.0e 6 Sep 2011

This is the server that I can connect with no delay.

Linux DIFFERENT_SERVER_DOMAIN_NAME 2.6.32.26-175.fc12.i686.PAE #1 SMP Wed Dec 1 21:45:50 UTC 2010 i686 i686 i386 GNU/Linux

OpenSSH_5.3p1, OpenSSL 1.0.0b-fips 16 Nov 2010

Here's the problematic server

 Linux THE_PROBLEMATIC_SERVER 2.6.18-238.9.1.el5PAE #1 SMP Fri Mar 18 12:50:00 EDT 2011 i686 i686 i386 GNU/Linux

OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

----------

## Princess Nell

sshd is performing a reverse DNS lookup of the client host IP. I.e. the client needs a PTR RR in the target network's DNS. Interesting that this is not on the openssh faq.

----------

## matomato76

 *Princess Nell wrote:*   

> sshd is performing a reverse DNS lookup of the client host IP. I.e. the client needs a PTR RR in the target network's DNS. Interesting that this is not on the openssh faq.

 

Thank for for your response, above all. Unfortunately, it doesn't work, yet. Thus, I have some more questions.. 

1. Would you like to say "That's reverse DNS look up problem!"? Nslookup IP_ADDRESS_TO_EACH_END works with no delay. Following your posting, I checked it. Also, my Ubuntu works with the same IP while Gentoo and Windows7(putty) don't. Can that still be a reverse DNS lookup problem..?

2. If you say 'yes' to number 1, do I have to keep a special data structure for reverse DNS lookup on the client side(my laptop, ssh client)? Then, what's the place? Is there any command to add necessary entries?

Thank you so much for your help. Have a nice day! Please, note that I am expecting your comments!

----------

