Report this

What is the reason for this report?

Unable to update SSH RSA token on existing Droplet

Posted on August 20, 2020

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.



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!

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.