Friday, December 2, 2011

On RHEL 6, SSH, DNS, Firewalls and slow logins

SkyHi @ Friday, December 02, 2011
I recently ran into an issue where SSH was taking a long time (around 20+ seconds) to log in to a number of RHEL 6 boxes. The funny thing was, the issue only occurred at a single co-location facility, all other RHEL 6 systems would login just fine. Turns out this is because the systems at the co-location facility are located behind a Cisco firewall, and between the firewall and the RHEL6 box lies the problem.
After spending a lot of time going back and forth with Red Hat support about the issue, I found a knowledge base article on the problem. Sadly Red Hat’s knowledge base is no longer accessible to the general public, however there is another more detailed post located at linuxquestions.
This is going to end up being a big deal for a lot of users in the future, so I thought I would post it up, but credit where credit is due, I didn’t find this solution, it appears that the chap that posted to linuxquestions did.
The long and the short of it is, add the following line to your /etc/resolv.conf file:

options single-request-reopen

This option is not documented in the man page sadly, but there is more information about it in this change log message.

REFERENCES
https://stomp.colorado.edu/blog/blog/2011/06/29/on-rhel-6-ssh-dns-firewalls-and-slow-logins/