4

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.

2 Answers 2

3

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.

2
  • 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, 2012 at 0:09
  • @sightofnick: that's more a job for your ISP. regarding slow-ssh: openssh.org/faq.html#3.3
    – akira
    May 10, 2012 at 9:18
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .