{"id":1030,"date":"2021-09-20T07:44:04","date_gmt":"2021-09-20T07:44:04","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=1030"},"modified":"2025-09-05T10:18:53","modified_gmt":"2025-09-05T05:18:53","slug":"digital-ocean-permission-denied-public-key","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/digital-ocean-permission-denied-public-key\/","title":{"rendered":"Digital Ocean Permission Denied (public key)"},"content":{"rendered":"<p>Effecting to get to your Digital Ocean dot and can&#8217;t move beyond Digital Ocean Permission Denied (public 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-permission-denied-public-key\/#Permission_Denied_Means\" >Permission Denied Means<\/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-permission-denied-public-key\/#Stage_1_Access_the_Digital_Ocean_online_terminal\" >Stage 1: Access the Digital Ocean online terminal<\/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-permission-denied-public-key\/#Stage_2_Allow_username_and_secret_expression\" >Stage 2: Allow username and secret expression<\/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-permission-denied-public-key\/#Stage_3_Setup_your_new_SSH_key\" >Stage 3: Setup your new SSH key<\/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-permission-denied-public-key\/#Stage_4_Revert_your_SSH_config_record\" >Stage 4: Revert your SSH config record<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Permission_Denied_Means\"><\/span>Permission Denied Means<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Digital Ocean Permission Denied (public key), This could be a direct result of different reasons, having some unsuitable public key section in your globule&#8217;s authorized keys, or making another public key on your structure which the drop doesn&#8217;t see yet.<\/p>\n<p>At the point when the public key is made, <code>see it using cat ~\/.ssh\/id_rsa.pub or override id_rsa.pub<\/code> with whatever name you gave the report. By and by copy that key.<\/p>\n<ul>\n<li>One Day head to your digital ocean web support. Go to Settings &gt; Security &gt; SSH Keys &gt; Add SSH Key. Add the <a href=\"https:\/\/jdblischak.github.io\/2014-09-18-chicago\/novice\/git\/05-sshkeys.html\" target=\"_blank\" rel=\"noopener\">SSH key<\/a> you copied and give it any name. Note that if the key at this point exists, it won&#8217;t be copied, so you can skirt this movement. eventually have a go at interfacing through SSH, if it works. In case it doesn&#8217;t work, that is what you&#8217;re staying nearby for.<\/li>\n<li>Head over to your dab&#8217;s dashboard and from the left-side decisions, select Access &gt; Console Access &gt; Launch Console. Enter your username and mystery key for the dab, and it&#8217;ll interface you to the drop through SSH (using a web program).<\/li>\n<li>You&#8217;ll need to enable mystery word login to your drop. To do accordingly, sudo nano, etc\/ssh\/sshd_config, peer down and set these to yes<\/li>\n<li>PermitRootLogin yes<\/li>\n<li>Password Authentication yes<\/li>\n<\/ul>\n<p><strong><u>\u200bSave the report and run organization sshd restart to restart the sshd uphold and apply the changes. <\/u><\/strong><\/p>\n<ol>\n<li>As of now a couple of articles might prescribe going to the ~\/.ssh\/authorized keys on the drop from the program SSH console, but it has a bug that simply copies the SSH key up to a particular character, and consequently, it won&#8217;t work. Thus, we&#8217;ll not do this movement right now.<\/li>\n<li>As you&#8217;ve enabled secret word confirmation to the worker, Effort SSH to it from the terminal, it&#8217;ll brief for the mysterious key, after which you should have the choice to relate. Without a doubt, the issue is handled, or then again if nothing else it&#8217;s a larger part.<\/li>\n<li>By and by we will adjust the nano ~\/.ssh\/authorized keys archive on the worker, stick your SSH key here in a newline (which you had made in Step 1). You would now have the option to restart the ssh organization again using organization sshd restart.<\/li>\n<li>Effort SSH using your terminal and you should have the alternative to relate without entering the mysterious key. <span style=\"color: #000000;\"><strong>Digital Ocean Permission Denied (public key)<\/strong><\/span>, As it&#8217;s a nice security practice to disable Password-based login, head over to sudo nano, etc\/ssh\/sshd_config again on your specialist, and set:<\/li>\n<\/ol>\n<ul>\n<li><code>Password Authentication No.<\/code><\/li>\n<\/ul>\n<p>Save the archive and restart sshd using organization sshd restart.<\/p>\n<p><a href=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/digital-ocean.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone  wp-image-12697\" title=\"digital ocean\" src=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/digital-ocean-300x157.jpg\" alt=\"digital ocean\" width=\"730\" height=\"382\" srcset=\"https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/digital-ocean-300x157.jpg 300w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/digital-ocean-1024x536.jpg 1024w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/digital-ocean-768x402.jpg 768w, https:\/\/arzhost.com\/blogs\/wp-content\/uploads\/2025\/09\/digital-ocean.jpg 1200w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/a><\/p>\n<p>That is, you should now have the alternative to log in to the specialist without any issues.<\/p>\n<p>Finally, Digital Ocean Permission Denied (public key), we recognize that you have some fundamental data on Ubuntu, SSH keys, request line editors (if not, just google it).<\/p>\n<p><strong><u>The vital framework of the going with progress: <\/u><\/strong><\/p>\n<ol>\n<li>Access the Digital Ocean online terminal<\/li>\n<li>Update the SSH config archive to allow username and secret expression login<\/li>\n<li>Plan new SSH key<\/li>\n<li>Return your SSH config archive<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Stage_1_Access_the_Digital_Ocean_online_terminal\"><\/span><strong>Stage 1: Access the Digital Ocean online terminal <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Sign in to your Digital Ocean record and snap Access &gt; Launch Console.<\/p>\n<p>This will get you into your dot through the online terminal.<\/p>\n<p>On the off chance that you&#8217;re sufficiently gutsy, you can effort to revive your SSH key clearly through this terminal, but the interface is a bit badly arranged and crushed on me. Digital Ocean Permission Denied (public key), Along these lines, I recommend the accompanying stages.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Stage_2_Allow_username_and_secret_expression\"><\/span><strong>Stage 2: Allow username and secret expression <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Then, at that point, Digital Ocean Permission Denied (public key), we&#8217;ll update the drop&#8217;s config record to allow SSH by username and secret expression. Note, the underneath will be a less secured plan, yet we&#8217;ll change it back in this way.<\/p>\n<ul>\n<li><code>Using your #1 director (nano under), open the record:<\/code><\/li>\n<li><code>sudo nano, etc\/ssh\/sshd_config<\/code><\/li>\n<\/ul>\n<p>We&#8217;ll revive this record to slow down \u201cPAM\u201d (Pluggable Authentication Modules). Find this line and update to no:<\/p>\n<ul>\n<li><code>UsePAM no<\/code><\/li>\n<\/ul>\n<p>We&#8217;ll moreover refresh this to allow secret key approval:<\/p>\n<ul>\n<li><code>Password Authentications yes<\/code><\/li>\n<\/ul>\n<p>Save and leave the report, and reload SSH on your globule:<\/p>\n<ul>\n<li><code>reload ssh<\/code><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Stage_3_Setup_your_new_SSH_key\"><\/span><strong>Stage 3: Setup your new SSH key <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you don&#8217;t have one presently on your close by machine, Digital Ocean Permission Denied (public key), set this up:<\/p>\n<ul>\n<li><code>ssh-keygen - t RSA<\/code><\/li>\n<\/ul>\n<p>Copy your key to the laborer, using your username and drop IP address rather than the demo underneath:<\/p>\n<ul>\n<li><code>ssh-copy id username@droplet_IP<\/code><\/li>\n<\/ul>\n<p>You should now have the alternative to complete the previously mentioned, and access your drop with your remarkable username and mystery word. Note, Digital Ocean Permission Denied (public key), if you have no idea about your username and mystery key, you should prefer to reset your root secret expression per the Digital Ocean docs.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Stage_4_Revert_your_SSH_config_record\"><\/span><strong>Stage 4: Revert your SSH config record <\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Since you are on the course of action with SSH keys, you can reset your config record back to its novel settings. You can either use the Digital Ocean terminal, Digital Ocean Permission Denied (public key), or SSH into your globule ssh username@droplet_IP.<\/p>\n<p><strong>Using your main director (nano underneath), open the record:<\/strong><\/p>\n<ul>\n<li><code>sudo nano, etc\/ssh\/sshd_config<\/code><\/li>\n<\/ul>\n<p>Return this archive to turn PAM on:<\/p>\n<ul>\n<li><code>UsePAM yes<\/code><\/li>\n<\/ul>\n<p>Return secret word affirmation to off:<\/p>\n<ul>\n<li><code>Password Authentication no<\/code><\/li>\n<\/ul>\n<p>Save and leave the archive, and reload SSH on your drop:<\/p>\n<ul>\n<li><code>reload ssh<\/code><\/li>\n<\/ul>\n<p>Your drop should now be a good thought to go!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Effecting to get to your Digital Ocean dot and can&#8217;t move beyond Digital Ocean Permission Denied (public key)? Permission Denied Means Digital Ocean Permission Denied (public key), This could be a direct result of different reasons, having some unsuitable public key section in your globule&#8217;s authorized keys, or making another public key on your structure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7401,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,25,14,16],"tags":[],"table_tags":[],"class_list":["post-1030","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-e-mail","category-knowledge","category-news","category-tutorial"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/1030","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=1030"}],"version-history":[{"count":4,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/1030\/revisions"}],"predecessor-version":[{"id":12698,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/1030\/revisions\/12698"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/7401"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=1030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=1030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=1030"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=1030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}