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.

Hennes
  • 65,804
  • 7
  • 115
  • 169
nkcmr
  • 227

2 Answers2

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.

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.

MattBianco
  • 2,323