very slow connection to ssh server from client (but not other servers)

Posted by AntonOfTheWoods on Server Fault See other posts from Server Fault or by AntonOfTheWoods
Published on 2013-11-05T21:47:06Z Indexed on 2013/11/05 21:55 UTC
Read the original article Hit count: 173

Filed under:
|
|

I have an Ubuntu 12.04 laptop that is taking so long to connect to various servers (in different data centres) that it seems like a bit of a lottery whether I'll actually get a connection. If I connect to the servers between themselves it's instantaneous, and I've set

UseDNS no
AddressFamily inet

On the servers I'm connecting to (and rebooted for good measure). I also put in the reverse DNS+IP of the cable connection I'm connecting from. If I connect from the laptop via telnet:

telnet my.server 22

Then the connection is also instantaneous, so it doesn't appear to be a problem with an intervening firewall. I have the same behaviour whether I connect with the IP, a short name in my hosts or the FQDN. I'm connecting with a 50mbps (cable, sync) connection so that doesn't appear to be the problem, and when I do finally get a connection then it's a good, quick, stable one. I have tried listening on another port (8000) and that makes no difference. Web and other connections from the laptop to the machine are also very good.

Does anyone have any ideas here?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about ssh