Used to be able to ssh into droplet, now operation times out

Hi, I set up an Ubuntu 16.04 droplet and nginx one or two days ago - all the setup was done via ssh from my os x machine, and I encountered no problems (yay DigitalOcean!)

However, today, attempts to ssh into my droplet reliably fail with “Operation timed out”

I can still access my droplet without issue via the DigitalOcean “console” feature. I have rebooted my Droplet several times through the web console. I have now put my droplet behind cloudflare. I still see the following failure when I try to ssh into my droplet from my home machine:

$ ssh -vvvv
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /Users/AKA/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to [] port 22.
debug1: connect to address port 22: Operation timed out
ssh: connect to host port 22: Operation timed out

…when I try:

sudo systemctl status ssh

I see that the ssh.service is Active and running (I can’t select text on the web console, sadly).

Any help would be greatly appreciated; I’d love to not have to destroy the droplet and start all over, but I guess that’s what I’m going to try next.



Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


From the console, run:

ufw status

… to see if the firewall is active. If it is, you can run ufw disable to disable the firewall and that should prevent the block (if it is indeed firewall related).

If that doesn’t work, was the Droplet setup with an SSH Key or did you receive an e-mail with a root password?

I had the same problem. You must disable ufw…then allow ssh…then enable ufw again…Try these commands (Mac OSX terminal)

*Do this before you logout of ssh (after installing nginx), or yes, you will be blocked from ssh, and will have to do the steps from withing the Droplet Console.

  • sudo ufw disable
  • sudo ufw allow ssh
  • sudo ufw enable
  • sudo ufw status

Hope that helps…

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel