Report this

What is the reason for this report?

Cant ssh into server

Posted on October 11, 2016

I setup a new droplet about 36hrs ago and followed the tutorials here on DO to create the ssh keys for my local computer. I logged out and then back in after to make sure it worked and I must have logged out and back in a few times after that.

Today however when I run ‘ssh myusername@myserverip’ nothing happens, the cursor moves to a new line and just sites there, no error message is given and Im not prompted to do anything else. Ive tried new terminals as well as restarting and still the same. I can see the .ssh folder in my main user directory on my computer (ubuntu) and in that there are the following files

known_hosts my-ssh-key my-ssh-key.pub

these all seem to have the keys in too.

What is the problem here?



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!

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.

Monday Sept 10 – just to confirm a simple solution to SSH not working with Firewall

Firewall will not allow SSH login unless the firewall has been set to allow SSH. To set the firewall correctly : login to droplet sudo ufw disable sudo ufw allow ssh sudo ufw enable

The sudo app list does not change. BUT the SSH login (eg via Putty using SSH keys) will then work fine. For me this has only happened with 16.04

Go to your droplet and click on Power on. that worked for me

From droplet console

sudo ufw disable sudo ufw allow ssh

and try ssh login. After login

sudo ufw enable sudo ufw status

You should see:

Status: active To Action From


Apache Full ALLOW Anywhere 22 ALLOW Anywhere Apache Full (v6) ALLOW Anywhere (v6) 22 (v6) ALLOW Anywhere (v6)

Port 22 is ssh port and it is allowed now.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.