Question

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 root@xxx.xxx.xxx.xxx
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 xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.
debug1: connect to address xxx.xxx.xxx.xxx port 22: Operation timed out
ssh: connect to host xxx.xxx.xxx.xxx 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.

Thanks,

AKA


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.

@akamediasystem

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?

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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…