SSH Timeout for Droplet with Port Number

Posted July 7, 2014 8.8k views

I am trying to ssh into my Digital Ocean droplet. I have been using it extensively for the past few days. Yesterday one of the iTerm windows I was using started returning a timeout message when I tried to SSH (the other windows already connected continued to work).

This morning I am trying to SSH in the same way I did yesterday (and all previous days) and I am getting a message of:

ssh: connect to host ipaddress port myport: Operation timed out. (with IP and port generalized)

All the other support questions that I searched through seem to encourage a person to destroy the droplet and start over. That doesn’t seem like an acceptable answer to me.

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
5 answers

try replacing ipaddress and myport by the IP address and port.

  • Did you see my note that I had generalized these two values? I actually had the port and IP address when I issued the command.

    Here it is ungeneralized:

    ~/ ssh -p 2300 deployer@
    ssh: connect to host port 2300: Operation timed out

This might sound like a dumb suggestion but have you tired a hard reboot? or connecting to the server via the control panel’s terminal?

Yes, I did see it.

Are you sure is your IP address?

  • Out of curiosity, if you saw it why did you still recommend that I replace the generalized values with the actual values? Did it not communicate well what I was meaning?

    Very strange. One of the values changed in the IP address in my alias on the command line. I had just been entering in the alias the whole time. Not sure how that got changed considering I wasn’t typing it in manually other than the one time to show you what I had entered in exactly. It was changed in my alias file though, which is strange…

    Anyway, thanks for pointing the possible typo out!

Yes, the exact reason why I ignored your comment about the IP being masked is to force you to type it (leading to the discovery of the typo you made)

Writing the correct IP in your alias file should fix the issue.

Have you set up any firewalling on this droplet? Running nmap on your IP address suggests that there are no open ports. What’s the output of:

sudo iptables -L

If you have set up an iptables firewall, you can open port 2300 with:

sudo iptables -A INPUT -p tcp --dport 2300 -j ACCEPT