Report this

What is the reason for this report?

ssh-key on already existed droplet

Posted on December 9, 2014

If I have already created my droplet, how can I add ssh-key to it?



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.

This comment has been deleted

@asb you didnt get me buddy, i hire various freelancer time to time for individual work in my server. and i need to give me my password for root access. what should i do in this case? isnt there any way to secure my server by giving them a sort of access by which they cant bring harm if they want?

also, i can add ssh key to my droplet by deploying from snapshot. correct?

You simply need to paste the contents of your public key into the ~/.ssh/authorized_keys file on the server. On a Mac or Linux computer, you can send your key to the server with this one command:

cat ~/.ssh/id_rsa.pub | ssh username@server.ip.addr "mkdir -p ~/.ssh && cat ~/.ssh/authorized_keys"

For all the details, check out this tutorial:

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.