{"id":1430,"date":"2021-11-08T07:04:07","date_gmt":"2021-11-08T07:04:07","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=1430"},"modified":"2025-09-08T12:25:01","modified_gmt":"2025-09-08T07:25:01","slug":"digital-ocean-add-ssh-key-to-droplet","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/","title":{"rendered":"Step-by-Step Guide to Add SSH Key to Digital Ocean Droplet"},"content":{"rendered":"<p>Marking into your Digital Ocean drops is more secure if you use SSH keys that appeared differently about using root secret keys. Today, \u201cDigital Ocean Add SSH Key to Droplet\u201d, I expected to add my critical angle for the existing dab (running over 3 years now) and to a drop, I have as of late made and game plan everything on it yet failed to add an SSH Key to it.<\/p>\n<p>We can add the key to our local machine while making a drop. Around here at <a href=\"https:\/\/arzhost.com\/\"><span style=\"color: #ff0000;\"><strong>ARZHOST<\/strong><\/span><\/a>, we routinely get sales to make a drop with SSH key as a piece of our <a href=\"https:\/\/en.wikipedia.org\/wiki\/DigitalOcean\" target=\"_blank\" rel=\"noopener\">Digital Ocean<\/a> Managed Services.<\/p>\n<p>Today, \u201cDigital Ocean Add SSH Key to Droplet\u201d, we have to analyze how our Hosting Expert Planners make a Digital Ocean drop with an SSH key.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#SSH_key_confirmation\" >SSH key confirmation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#How_Are_We_Making_SSH_key_pairs\" >How Are We Making SSH key pairs?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#Setting_up_your_key_on_Digital_Ocean\" >Setting up your key on Digital Ocean<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#Adding_your_key_to_a_Droplet\" >Adding your key to a Droplet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#Frantic_attempt_to_add_the_key\" >Frantic attempt to add the key<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#How_do_we_make_a_dot_with_an_SSH_key\" >How do we make a dot with an SSH key?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#1_Generate_SSH_key_with_OpenSSL_for_Droplet\" >1) Generate SSH key with OpenSSL for Droplet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#2_Generate_an_SSH_key_with_Putty_for_Droplet\" >2) Generate an SSH key with Putty for Droplet<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/arzhost.com\/blogs\/digital-ocean-add-ssh-key-to-droplet\/#People_Also_Ask\" >People Also Ask<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"SSH_key_confirmation\"><\/span><strong>SSH key confirmation <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The SSH key resembles a username and mystery word. We can add a key to Digital Ocean Droplet while making it or in the wake of making a drop.<\/p>\n<p>At the point when we add the SSH key to the Droplet, we can sign in to the server from that machine without a secret word. \u201c<span style=\"color: #000000;\"><strong>Digital Ocean Add SSH Key to Droplet<\/strong><\/span>\u201d, Permit us to inspect how our Hosting Expert Planners make a Droplet with an SSH key<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_Are_We_Making_SSH_key_pairs\"><\/span><strong>How Are We Making SSH key pairs?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Open up a terminal and type ssh-keygen &#8211; t RSA &#8211; b 4096<\/li>\n<li>Answer the requests that surface (it is OK to just keep on hitting enter)<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Setting_up_your_key_on_Digital_Ocean\"><\/span><strong>Setting up your key on Digital Ocean <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Copy the substance of your public key&#8217;s report ({HomeFolder}\/.ssh\/ {key Name}.pub)<\/li>\n<li>Go to the Security Section<\/li>\n<li>Paste the SSH key<\/li>\n<li>Snap &#8220;Add SSH Key&#8221;<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Adding_your_key_to_a_Droplet\"><\/span><strong>Adding your key to a Droplet <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In case you by and by making a Droplet it will at this point have your SSH key in its authorized keys report inferring that you can SSH into your Droplet by typing ssh root@0.0.0.0 into your terminal (displacing 0.0.0.0 with your Droplet&#8217;s IP address).<\/p>\n<p>If you at this point have a Droplet you should SSH into it using. \u201cDigital Ocean Add SSH Key to Droplet\u201d, whichever procedure you used already, and add your SSH key to its official keys report. This is a great assistant.<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/ssh-key-confirmation-1.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone  wp-image-12749\" title=\"ssh key confirmation\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/ssh-key-confirmation-1-300x157.jpg\" alt=\"ssh key confirmation\" width=\"730\" height=\"382\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/ssh-key-confirmation-1-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/ssh-key-confirmation-1-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/ssh-key-confirmation-1-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/ssh-key-confirmation-1.jpg 1200w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/a><\/p>\n<p>Assuming you at this point have a Droplet and you are at this point not prepared to SSH into this is because you by and by don&#8217;t have a usable private key (like the situation portrayed beforehand). It will be to some degree trickier.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Frantic_attempt_to_add_the_key\"><\/span><strong>Frantic attempt to add the key <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Progressed Ocean luckily has a button to dispatch a Console Window related to your Droplet that you can use the same way that you would use your terminal related through SSH to the Droplet. \u201cDigital Ocean Add SSH Key to Droplet\u201d, I unsuccessfully protested this program Console Window. While staying my SSH key the Console would print the underlying very few characters precisely and thereafter it would start sticking uncommon characters which were missing in the first.<\/p>\n<p>To handle this, open the report, etc\/ssh\/sshd_config using the Console and change the value Password Authentication to yes. Restart the server and you will need to sign in to your Droplet using Password Authentication.<\/p>\n<p>Then, you can follow this marvelous manual to add your new SSH key. Restart the server again at whatever point you are done. Besides, \u201cDigital Ocean Add SSH Key to Droplet\u201d, by and by you should have the choice to get to your Digital Ocean Droplet through SSH using the private key you have as of late setup.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_do_we_make_a_dot_with_an_SSH_key\"><\/span><strong>How do we make a dot with an SSH key? <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Most importantly, we sign in to the Digital Ocean control board. Then, we click on Create in the upper right corner, and beginning from the drop we select Droplets. As of now we truly need to Choose an image, thusly we select the OS and the variation.<\/p>\n<p>Then, in Choose a course of action, we select the plan reliant upon the essentials. In Choose a datacenter region, we select the region for the Droplet. Then, in Authentication, \u201cDigital Ocean Add SSH Key to Droplet\u201d, we select SSH keys and click on New key. As of now, a Window appears where we add a public SSH key.<\/p>\n<p>Therefore, we use OpenSSL to deliver a key for Linux and macOS. We use Puttygen to create a key in the Windows machine. \u201cDigital Ocean Add SSH Key to Droplet\u201d, Permit us to discuss both the methods used to create a key in the customers close by machine.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"1_Generate_SSH_key_with_OpenSSL_for_Droplet\"><\/span><strong>1) Generate SSH key with OpenSSL for Droplet <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Most importantly, we open the terminal and run the going with request<\/p>\n<ul>\n<li>ssh-keygen<\/li>\n<\/ul>\n<p>As of now, a brief appears to enter the record name to save the key. We press enter. Thus, it takes the default region. Then, a brief appears to make and avow a passphrase for the key. If we add a passphrase, we truly need to enter each time the key is used. As such, \u201cDigital Ocean Add SSH Key to Droplet\u201d, we Press Enter to evade the brief. Thusly, two records are made as is normally done id_rsa and id_rsa.pub. By and by we reorder the substance of the id_rsa.pub. We use the request the view the record.<\/p>\n<ul>\n<li>cat ~\/.ssh\/id_rsa.pub<\/li>\n<\/ul>\n<p>Subsequently, we copy the key and paste it into the Digital Ocean board.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"2_Generate_an_SSH_key_with_Putty_for_Droplet\"><\/span><strong>2) Generate an SSH key with Putty for Droplet <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If we need to interface with a Linux machine from Windows we truly need an application Putty. Along these lines, we present Putty. Furthermore, we inform Puttygen to produce the key.<\/p>\n<p>\u201cDigital Ocean Add SSH Key to Droplet\u201d, At the point when we present it we open Puttygen. In the limit fragment, we select the kind of key to making.<\/p>\n<ul>\n<li>We click on Generate. Then, we move the mouse over the application to deliver a key.<\/li>\n<li>In like manner, we get the public key and the private key. We save the private key.<\/li>\n<li>We stick the substance of the public key in the Digital Ocean board.<\/li>\n<li>At the point when our customer gave us the key. We proceed with further advances.<\/li>\n<li>Then, at that point, we enter a Name for the key.<\/li>\n<li>Finally, we click on Add SSH key.<\/li>\n<\/ul>\n<p>\u201cDigital Ocean Add SSH Key to Droplet\u201d, At the point when we add the SSH key we keep making the dot.<\/p>\n<ul>\n<li>Then, in Finalize and make, we select the number of Droplets to make, and we enter a hostname for the Droplet.<\/li>\n<li>In the Add lines fragment, we take a gander at Enable Backup. Enabling it will thusly take support step by step of the globule.<\/li>\n<li>Finally, we click on Create Droplet.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this way, \u201cDigital Ocean Add SSH Key to Droplet\u201d, we have analyzed the key-based approval. Moreover, we saw how our Hosting Expert Planners make a Digital Ocean drop with an SSH key for our customers.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"People_Also_Ask\"><\/span><strong>People Also Ask<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Question # 1: How do I add a new SSH key to a DigitalOcean droplet?<\/strong><\/p>\n<p>Answer: Use OpenSSH to create new SSH keys on macOS, Linux, or Windows Subsystem for Linux. Use PuTTY to create SSH keys on Windows systems without Bash. Add your SSH key to your Droplets. On DigitalOcean, you can <b>upload your SSH public key<\/b>\u00a0to your account, which lets you add it to your Droplets at creation time.<\/p>\n<p><strong>Question # 2: Where do I paste SSH keys?<\/strong><\/p>\n<p>Answer: On your computer, in the PuTTYgen utility, copy the contents of the public key (displayed in the area under &#8220;Key&#8221;) onto your Clipboard. Then, on the remote system, use your favorite text editor to paste it onto a new line in\u00a0<b>your ~\/.<\/b>\u00a0<b>ssh\/authorized_keys file<\/b>, and then save and close the file.<\/p>\n<p><strong>Question # 3: Why is my SSH key not working?<\/strong><\/p>\n<p>Answer: Make\u00a0<b>sure the authorized_keys file<\/b>\u00a0and the private key itself have the correct permissions and ownership. Check that key-based authentication is allowed by the server. Make sure the private key is readable by the SSH client. If you&#8217;re using PuTTY, make sure your SSH keys are properly configured for the session.<\/p>\n<p><strong>Question # 4: How do I reset my root password DigitalOcean?<\/strong><\/p>\n<p>Answer: Navigate to the control panel. From the project, the Droplet is in, or from the main navigation&#8217;s Droplets page, locate the Droplet. Click the Droplet&#8217;s name to open its detail page, then select Access in the left navigation. <b>Click Reset Root Password<\/b> to reset the Droplet&#8217;s password.<\/p>\n<p><strong>Question # 5: How do I access the droplet console?<\/strong><\/p>\n<p>Answer: From the DigitalOcean Control Panel, first click the name of the Droplet you want to access, then select Access from the left navigation. Click the Launch\u00a0<b>Console<\/b> button to open a web-based console session. When the console opens, click the console screen and press ENTER to ensure that the login prompt has focused.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Marking into your Digital Ocean drops is more secure if you use SSH keys that appeared differently about using root secret keys. Today, \u201cDigital Ocean Add SSH Key to Droplet\u201d, I expected to add my critical angle for the existing dab (running over 3 years now) and to a drop, I have as of late [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7221,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,25,14,16],"tags":[],"table_tags":[],"class_list":["post-1430","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting","category-knowledge","category-news","category-tutorial"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/1430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/comments?post=1430"}],"version-history":[{"count":4,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/1430\/revisions"}],"predecessor-version":[{"id":12750,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/1430\/revisions\/12750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/7221"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=1430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=1430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=1430"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=1430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}