How can I verify if my SSH keys are working?

Posted April 2, 2020 2k views

I added the SSH key through the security section of my Digital Ocean account. However, when I log in remotely using Terminal in my mac, I am being asked for the password.

How can I tell if the key is working correctly?

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
1 answer

Hi @georodrigues,

If you are being asked for your Password, if would mean the SSH key is not working properly.

Now, I do have one question, did you add the SSH key and then created your droplet by selecting the said SSH key or did you add the key after you’ve created the droplet?

If you did the latter, the SSH key won’t work, it would need to be added to your Droplet. If you are unaware how to do so, you can check the following two articles

Both should help you with adding the key to your droplet.


by Hanif Jetha
SSH-key-based authentication provides a more secure alternative to password-based authentication. In this tutorial we'll learn how to set up SSH key-based authentication on an Ubuntu 18.04 installation.