Could you please let me know if you’re getting a Permission denied (publickey) error message when you try to ssh to your droplet?
I will recommend you to follow this tutorial and setup new pair of ssh keys and then upload them to your droplet:
The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
ssh-keygen -t rsa
If you have password authentication enabled on your droplet you can upload the id_rsa.pub key file directly to your droplet using the follow command:
cat ~/.ssh/id_rsa.pub | ssh root@IPaddress "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys"
- change the IPaddress with the IP address of the droplet.
Hope this helps!
Let me know how it goes.
SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. With SSH keys, users can log into a server without a password. This tutorial explains how to generate, use, and upload an SSH Key Pair.