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
192.168.0.10 debian.local

// on Linux or FreeBSD
# vi /etc/hosts
192.168.6.105 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
or
# service sshd restart

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

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

On UNIX:
# kill -HUP `cat /var/run/sshd.pid`

No comments: