Slow SSH login in SuSE Linux
Starting with SuSE 10 and including both openSuSE and SLES an annoying SSH problem appeared. When you SSH to the server (via PuTTY and such) you get the “login” prompts right away, but the “password” prompt takes up to 30 seconds to appear. Two things need to be done to correct this issue:
First, as root you need to make sure /etc/hosts has an entry with your server’s external IP and hostname. Here’s an example showing the hostname “icebox” and the IP for the primary NIC “192.168.122.98″ both present in /etc/hosts:
icebox:~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:22:15:C8:A0:48 inet addr:192.168.122.98 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:830763 errors:0 dropped:0 overruns:0 frame:0 TX packets:377151 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:1219530793 (1163.0 Mb) TX bytes:23997815 (22.8 Mb) Interrupt:220 icebox:~ # grep `hostname` /etc/hosts 127.0.0.2 icebox.jedi icebox 192.168.122.98 icebox iceboxg iceboxg 192.168.122.99 iceboxw
Second, edit the SSH server configuration file /etc/ssh/sshd_config and add (or change, if already present) the UseDNS parameter to read “no”. After that restart sshd:
echo "UseDNS no" >> /etc/ssh/sshd_config /etc/init.d/sshd restart
Hopefully, the login delay will now be gone.
Popularity: 13% [?]





Thanks!
Very useful
James