Question

Unable to update SSH RSA token on existing Droplet

I was following the tutorial on https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/to-existing-droplet/ but when trying to add my key to the authorized_keys (droplet) it seems like the whole key is not getting copied and pasted from my windows system using PuttyGen to the Ubuntu console.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi, @CuteBlueRay

If you use the following command to copy your ssh key to the droplet are you getting any error messages or the command is executed without errors?

cat ~/.ssh/id_rsa.pub | \
ssh username@203.0.113.0 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

Keep in mind you need to change 203.0.113.0 with your droplet IP address. Also keep in mind that you can check if the ssh key was copied okay using the DigitalOcean console within your account control panel.

Hope that this helps! Regards, Alex