Question

How can I verify if my SSH keys are working?

Posted April 2, 2020 116 views
Security

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.

×
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

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-1804

https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/

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

Regards,
KDSys

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.
Submit an Answer