Saturday, June 23, 2012

Password prompted slowly when using PuTTY to ssh into remote machine

It's most likely DNS issue. Here are few ways to solve:

Add DNS records to local and remote machine:
// on Windows
Edit c:\windows\system32\drivers\etc\hosts debian.local

// on Linux or FreeBSD
# vi /etc/hosts debian.local

Disable remote-controlled window title changing in PuTTY:
PuTTY Configuration > Terminal > Features > check "Disable remote-controlled window title changing".

Add this line to /etc/ssh/sshd_config file:
# vi /etc/ssh/sshd_config
UseDNS no

To restart sshd server:

On CentOS / RHEL / Fedora / Redhat:
# /etc/init.d/sshd restart
# service sshd restart

On Debian / Ubuntu:
# /etc/init.d/ssh restart
# service ssh restart

On FreeBSD:
# /etc/rc.d/sshd restart

# kill -HUP `cat /var/run/`

No comments: