Can't connect to droplet using SSH or FileZilla

Connection issue using SSH and FileZilla

I cannot connect to my droplet both using SSH and using FileZilla. Using: I can see the IP is active and I can ping it but permission is denied every time.

I have also tried to deactivate the firewall but nothing works. Please some help would be appreciated because a server I cannot access is of little use to me :/

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.

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.

Thank you for your reply, unfortunatly the PasswordAuthentication in sshd_config was already set to yes so the next steps still don’t work

Hello, @simonburgermeister

What you can do is to access your droplet via the console from your DigitalOcean’s control panel and then make sure that your ssh-key is added or you can enable the PasswordAuthentication and then access the droplet from your machine and then add your keys and tweak the configuration if needed.

If you access the droplet via the console you can check if your key is present in the ~/.ssh/authorized_keys file and if not you can add it and this should sort the connectivity issue for you. However if you’re finding difficulties to do so due to issues with the text editor or copying/pasting the key there is another way to achieve this.

You can tweak temporary tweak the ssh configuration and allow PasswordAuthentication in order to access your droplet from your PC. In order to do that you need to access the droplet from the console again.

Use vim or nano to edit the contents of /etc/ssh/sshd_config Eg.

vi /etc/ssh/sshd_config or nano /etc/ssh/sshd_config

Now go to the very bottom of the file (to the line with PasswordAuthentication) - Change the value next to PasswordAuthentication from no to yes. It should now look like this:

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes

Save the file and then run the following command to reload the SSH config:

sudo service sshd reload

With this done, you can now set up your new SSH key for your LOCAL device. To do this, you can run the following from your LOCAL device, not the server:

ssh-copy-id username@droplet.ip

Alternatively, you can paste in the keys using SSH:

cat ~/.ssh/ | ssh username@droplet.ip "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >>  ~/.ssh/authorized_keys"

Note: You need to change username and droplet.ip with your actual username and Droplet’s IP address

Hope this helps!

Let me know how it goes.

Regards, Alex