ssh: connect to host ***.**.**.** port 22: Operation timed out

Posted July 24, 2014 233.2k views

Yesterday I created a droplet. Tried to connect through the console, but gives this message : ssh: connect to host **...* port 22: Operation timed out. I’m from Ukraine. Server took in London.

  • Hi, same thing happened today, solved it by specifying to allow port 22 in ufw config like so

    sudo ufw allow 22/tcp


  • Even I had a similar problem for one of my ISP. Since I have 2 Internet connections, I ssh-logged in on the second one and entered the above command by @fmilland

    sudo ufw allow 22/tcp

    Then, after flushing my DNS cache, it started working on my 1st connection as well.

    But I have a question though, does my server become less secure or more prone to hacks by entering “sudo ufw allow 22/tcp”? Thanks.

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.

Submit an Answer
14 answers

I had a similar issue twice with two different droplets. Rebooting the server helped in both cases.

Login to your DigitalOcean dashboard and access the droplet via the Console Access. If you’re able to login there, just enter the following command to reboot

sudo reboot

If you cannot login, then use the Power Cycle button instead.

Hope this helps someone :)

I also had a similar problem.
Was getting connection timed out all the time. :(

On using the Power Cycle, as pointed out by @tamara worked for me. :)

Is your droplet marked as Active in the control panel?

In case it is, you may be experiencing a routing problem which your ISP should be able to fix. You can try to run a traceroute to see if this is the case (tracert command in Windows, traceroute command in Linux).

If the traceroute succeeds without timeouts/endless loops, then try to create a new Ubuntu 14.04 droplet in LON1 and see if you can connect to it.

Hi there.

I tried cycling the power, but still doesn’t work. Tried on three separate networks too, and still not able to SSH onto my box.

The only way I can access it is using the console.

Any ideas?

  • Is SSH actually running? What’s the output of sudo netstat -plunt | grep ssh

  • I have created a ticket. No response from support after 4hs. This is the closest community topic I found to what I’m seeing. My server was working fine. I didn’t touch a thing on network, I just rebooted it to reset my root password and KABOOM. Stopped working. I can’t ssh, I can’t ping. But I can connect to the Web Console VNC. This is what I get from my personal computer trying to reach it:

    traceroute to (, 64 hops max, 52 byte packets
     1 (  1.091 ms  0.678 ms  0.542 ms
     2 (  23.469 ms  52.134 ms  644.612 ms
     3 (  86.239 ms  259.266 ms  685.834 ms
     4 (  32.590 ms  35.581 ms  46.288 ms
     5 (  37.096 ms  82.979 ms  72.270 ms
     6 (  47.290 ms (  34.847 ms (  83.658 ms
     7 (  50.447 ms (  79.791 ms (  69.496 ms
     8 (  75.247 ms (  53.895 ms  64.767 ms
     9 (  96.939 ms  265.798 ms  236.146 ms
    10 (  481.158 ms  99.153 ms  215.807 ms
    11 (  240.589 ms  139.728 ms  139.888 ms
    12 (  172.855 ms  365.215 ms (  98.013 ms
    13 (  218.809 ms (  123.725 ms (  131.329 ms
    14 (  113.914 ms (  120.716 ms (  121.820 ms
    15 (  116.004 ms (  175.508 ms (  207.668 ms
    16  * * *
    17  * * *
    18  * * *
    19  * * *
    20  * * *
    21  * * *
    22  * * *
  • I have similar question. I can’t ssh. Once I tried to connect ssh, ping was timeout. But web console was work.

  • I have the same problem like tomasdev with similar values with the traceroute, from 16 onwards starting with * * *

    Can’t login to my server, what could be the cause?

  • This just happened to me…twice. Here’s my scenario:

    1. Had an old droplet that I destroyed.
    2. Created a new droplet to find that it provisioned the same IP as the one I just destroyed. ssh was a no go and I just chalked it up to being the IP was stuck in DNS propagation cycle.
    3. Created yet another droplet to provision a different IP.
    4. Destroyed the droplet that was not responding to ssh.
    5. ssh Times out every attempt. I’ve never so much as even signed into this new droplet and it’s already timing out…I don’t understand.

    I can ssh into the console fine, which is to be expected.

    netstat -plunt | grep ssh shows SSH is running normally on port 22, the same port I’m trying to connect to.

    Finally after several reboots/power offs, I’m back in. So weird.

  • same thing here, struggling for days to get this thing working.

I had the same issue. I had to log in using VNC Connection, which upon login immediately prompts me to reset root password. After that I could connect using ssh without problem. Don’t know whether it’s related to my not using a SSH key to connect. Could be a procedure update on the side of Ubuntu? I suggest digitalocean revise their setup guide for Ubuntu 14.04.

I am facing the same problem,

  1. rebooted several times
  2. ran power cycle

Still cant access droplet via console and none of the websites are accessible.

It was working fine and all sites were working fine couple of hours ago.

i am having the same problem in 2018:>how to fix it ssh: connect to host ***** port 22: Operation timed out

I’m having same problem, no help from digitalocean. :(

I’m having same problem, no help from digitalocean. :(

Facing the same issue. Tried running sudo ufw allow 22 but it says “ufw command not found”. It happened after I upgraded my kernel and all other packages.

Update: I restarted by droplet with this command: sudo rebot, and was able to connect with FTP for a few seconds after it got back up. But after navigating to a folder, about 20 seconds after the restart, I got the same error again. Connection timed out after 20 seconds of inactivity.

Previous 1 2 Next