Thursday, July 18, 2013

Slow ssh in RHEL/CentOS

It's everywhere and so it's also here, if ssh to Red Hat or CentOS takes forever, here's a quick fix:
# sed -i 's/^#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config
# sed -i 's/^#GSSAPIAuthentication no/GSSAPIAuthentication no/g' /etc/ssh/sshd_config
# sed -i 's/^GSSAPIAuthentication yes/#GSSAPIAuthentication yes/g' /etc/ssh/sshd_config
# service sshd restart