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.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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