Slow to connect to droplet through ssh or ftp

September 29, 2014 7.2k views

Three to four months ago connecting to my droplet through ssh took about a second. Then suddenly it takes from a minute to two before I'm prompted for the password. And then about the same time to get to the command line in my centos droplet.

Sam goes for an ftp connection. A minute to connect and list the files. Another minute for connection is established to upload a file. Then the file upload it self isn't too bad. But still, waiting two minutes to connect isn't cool.

I'm on the cheapest package. But I find it weird that it was quick and then quite a substantial drop in speed.

Is this a know problem? Is it something that can be fixed? Or do I need to upgrade to a more expensive package for quicker connections? Mind you that its only connection that is the problem. The initial connect.

1 comment
  • Thanks a lot it worked very well for ssh and vim editor.

    Is there a way so that page download (js, css, json) also is fast from my droplet(5$/ 512mb / 1core) ?

8 Answers

Try this:

  1. Edit the ssh config nano /etc/ssh/sshd_config

  2. Disable "use dns" option useDNS yes # CHANGE THIS TO no

  3. Save and close ctrl + X, Y, enter

  4. Restart the sshd service service sshd restart

Has similar issue, for me i have no useDNS inside sshd_config, should i add it?

There was a mistake: Restart the sshd service service sshd restart

Correct is: service ssh restart

- if you dont have that option, just add anywhere
# option use DNS
useDNS no
- after that restart
service sshd restart
- if not available 
service ssh restart
- try log in again 

Thanks! Helped me...

For those who are interested: useDNS no is now the default setting

We don't modify this in Debian/Ubuntu. The default was changed to "UseDNS no" in OpenSSH 6.8p1, which is in Ubuntu 15.10 and later.

And an explanation of its use can be found at:


The UseDNS option is mostly useless.

Have another answer? Share your knowledge.