By userdo
I created a droplet/VPS.
How can I view which of my SSH keys a VPS can use?
I added some SSH keys to my digitalocean account.
I created a droplet, I don’t recall which SSH keys I clicked the checkboxes for, for it to have access to.
How can I check?
At the moment the SSH key that I thought i’d “checked”/clicked the checkbox for the VPS to use, isn’t letting me in. So I can’t access my VPS.
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!
I think the most you can do from the digitalocean site is view SSH keys added to your digitalocean account, https://cloud.digitalocean.com/account/security
The screen where you pick what SSH keys are associated with the VPS/droplet, is only there as a form you fill in for creating it. After that, you don’t get that screen, and you’re expected to be able to get into the VPS, ssh root@ip and from there you can see what SSH keys are added cat ~/.ssh/authorized_keys , standard SSH methods.
Hello,
You can check the ~/.ssh/authorized_keys file using the DigitalOcean console and see if your ssh-key is added in the file.
You can enable PasswordAuthentication for your Droplet by modifying your /etc/ssh/sshd_config file. Once set to Yes restart the SSH service and connect via an SSH client for a more stable connection. You can then modify your ~/.ssh/authorized_keys file to add the appropriate public key.
This should do the job for you as well.
The other option is to temporary enable the PasswordAuthentication from no to yes in order to access your droplet using password and then once you’ve entered your key to disable the PasswordAuthentication again. This way is considered more secure than uploading the key to a Dropbox in case you don’t have any other server to us.
sudo nano /etc/ssh/sshd_configPasswordAuthentication from “no” to “yes” and save the filesudo nano ~/.ssh/authorized_keyssudo nano /etc/ssh/sshd_configPasswordAuthentication from “yes” to “no” and save the fileHope that this helps! Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.