Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a server hooked directly up to the internet, no router. But when I go to login to ssh it is VERY slow. It is not the connection as you can see here by the response time on this ping: ping operation average ms=3.769

What settings do I need to tweek in order to speed up the login process.

share|improve this question

2 Answers 2

You need to make sure that the server can resolve the address you're SSHing from to a hostname. That or disable the UseDNS option in the sshd configuration. But preferably the first.

share|improve this answer
    
I couldn't find the UseDNS option in the config files, so how do I setup my network to be able to be resolved to a hostname. –  nkcmr May 10 '12 at 0:09
    
@sightofnick: that's more a job for your ISP. regarding slow-ssh: openssh.org/faq.html#3.3 –  akira May 10 '12 at 9:18

In /etc/nsswitch.conf, make sure the line that begins with host: reads:

host: files dns

Apparently Ubuntu somethimes have problems with avahi-daemon and mdns4_minimal / mdns4.

I had problems with slow ssh connections when my nsswitch.conf read:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

I didn't try only removing the NOTFOUND clause. Perhaps that would have helped too.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.