Speeding up SSH authentication to Ubuntu servers
Posted by Tariq • Saturday, May 1. 2010 • Category: Tidbits
My delays were around 7-10 seconds. If you setup Linux servers you'll encounter this issue often, but some people seem to live with the long delays because they think it takes that much time to do the ultra secure crypto they'll be using -- the crypto takes no more than a second on today's processors. The issue is, usually, caused by the sshd daemon trying to do reverse DNS queries on incoming connections by default. So, let's just tell sshd a bit more explicitly not to do the lookups. Below is pasted from my
#Don't dare use DNS you c***!
UseDNS no
After changing the
/etc/ssh/sshd_config file, you could append it to yours, enjoy!#Don't dare use DNS you c***!
UseDNS no
After changing the
sshd_config file and restarting the sshd daemon (sudo /etc/init.d/ssh restart) on the Ubuntu/Debian server you can try to login again using ssh on your client. If you need to check the speed do something like this:
$ time ssh user@host exit
real 0m0.715s
user 0m0.086s
sys 0m0.011s
Fri, 27.08.2010 16:46
Hey! Thanks. This works great in my browser.