Gl.ib.ly

(glibly); Just another techie blog.

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 /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





Defined tags for this entry: , , ,
Vote for articles fresher than 90 days!
Bookmark Speeding up SSH authentication to Ubuntu servers   at del.icio.us Digg Speeding up SSH authentication to Ubuntu servers  Bloglines Speeding up SSH authentication to Ubuntu servers  Technorati Speeding up SSH authentication to Ubuntu servers  Fark this: Speeding up SSH authentication to Ubuntu servers  Bookmark Speeding up SSH authentication to Ubuntu servers   at YahooMyWeb Bookmark Speeding up SSH authentication to Ubuntu servers   at Furl.net Bookmark Speeding up SSH authentication to Ubuntu servers   at blogmarks Stumble It!

0 Trackbacks

  1. No Trackbacks

1 Comments

Display comments as (Linear | Threaded)
  1. Finally, something that solved my 30+ second login wait for one of my hosts. Thanks.

Add Comment


Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.