By huanyichen
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!
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:
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.