By coolguydeepu
I’ve read both tutorials
But I am in kind of midway where I am currently using password but want to switch to SSH, I couldn’t find specific article to my usecase.
I am wondering that my case might be bit common for anyone in their early days of using DO. Looking for some help :)
Any help is highly appreciated. Thanks!
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!
Hi @coolguydeepu,
In both ways, I think you’ll be using SSH. Do you by any chance mean if you would be using a Password or an SSH key?
If that is the case, I’ll recommend using SSH key every day.
Now, to do so, you have two options. The first is to add your SSH key before you create your droplet. The second if you have already created your droplet is to add it.
If you want to create the droplet with an SSH key added, you’ll need to have one. If you are on a Linux machine, create the SSH key would go like this:
ssh-keygen -t rsa -C "your_email@example.com"
If you want to use the default options all you need to do is hit enter a couple of times.
The key you need to use and add to your account can be found at /your/user/dir/.ssh/id_rsa.pub. You need to add the content of the file to your account and select the key when creating the Droplet.
Now, the second option, if you need to add at a later date. You need to enter your Droplet and add the same id_rsa.pub file in the following directory - /root/.ssh/authorized_keys. Once you do, you have your key added to your Droplet and you can use it, instead of a Password.
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.