Bobcares

DigitalOcean create droplet with ssh key – How we achieve it?

by | Feb 9, 2020

Want to create a DigitalOcean Droplet with SSH key?

We can add the key of our local machine when creating a droplet.

At Bobcares, we often receive requests to create a droplet with SSH key as a part of our DigitalOcean Managed Services.

Today, let’s discuss how our Support Engineers create a DigitalOcean droplet with an SSH key.

 

SSH key authentication

The SSH key is similar to a username and password.

We can add a key to DigitalOcean Droplet when creating it or after creating a droplet.

Once we add the SSH key to the Droplet we can log in to the server from that machine without password.

Let us discuss how our Support Engineers create a Droplet with SSH key

 

How we create a droplet with SSH key?

First, we log in to the DigitalOcean control panel.

Then we click on Create in the top right corner and from the drop-down we select Droplets.

Now we need to Choose an image, thus we select the OS and the version.

Then in Choose a plan, we select the plan based on the requirements.

In Choose a datacenter region we select the region for the Droplet.

Then in Authentication, we select SSH keys and click on New key. Now a Window appears where we add public SSH key.

Thus, we use OpenSSL to generate a key for Linux and macOS. We use PuTTYgen to generate a key in the Windows machine.

Let us discuss both the methods used to generate a key in the customers local machine.

 

1) Generate SSH key with OpenSSL for Droplet

First, we open the terminal and run the following command

ssh-keygen

Now a prompt appears to enter the file name to save the key. We just press enter. Thus, it takes the default location.

Then a prompt appears to create and confirm a passphrase for the key. If we add a passphrase, we need to enter every time the key is used.

Thus, we Press Enter to bypass the prompt. Thus, two files are generated by default id_rsa and id_rsa.pub.

Now we copy and paste the content of the id_rsa.pub. We use the command the view the file.

cat ~/.ssh/id_rsa.pub

Thus, we copy the key and paste it in the DigitalOcean panel.

 

2) Generate an SSH key with PuTTY for Droplet

If we need to connect to a Linux machine from Windows we need an application PuTTY.

Thus, we install PuTTY. Also, we install PuTTYgen to generate the key.

Once we install it we open PuTTYgen. In the parameter section, we select the type of key to generate.

We click on Generate. Then we move the mouse over the application to generate a key.

Thus, we get the public key and the private key. We save the private key.

We paste the content of the public key in the DigitalOcean panel.

DigitalOcean create droplet with ssh key

Once our customer provided us the key. We proceed with the further steps.

Next, we enter a Name for the key.

Finally, we click on Add SSH key.

Once we add the SSH key we proceed creating the droplet.

Then in Finalize and create, we select the number of Droplets to create, and we enter a hostname for the Droplet.

In the Add backups section, we check Enable Backup. Enabling it will automatically take backup weekly of the droplet.

Finally, we click on Create Droplet.

 

[Need assistance to manage droplets – We can help you]

 

Conclusion

In short, we have discussed the key-based authentication. Also, we saw how our Support Engineers create a DigitalOcean droplet with SSH key for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF