{"id":3330,"date":"2023-04-27T15:57:19","date_gmt":"2023-04-27T12:57:19","guid":{"rendered":"https:\/\/www.virtono.com\/community\/?p=3330"},"modified":"2023-04-25T16:20:33","modified_gmt":"2023-04-25T13:20:33","slug":"how-to-set-up-ssh-keys-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/","title":{"rendered":"How to Set Up SSH Keys on Ubuntu 20.04"},"content":{"rendered":"\n<p>In this tutorial, we will learn how to set up SSH keys on Ubuntu 20.04. Secure Shell (SSH) is a protocol used to securely connect to a remote server or computer. It provides a secure way to transfer files, execute remote commands, and manage remote systems. SSH keys are a more secure way to authenticate with a server or computer than passwords.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue 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-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/#Step_1_Check_for_existing_SSH_Keys_on_Ubuntu\" title=\"Step 1: Check for existing SSH Keys on Ubuntu\">Step 1: Check for existing SSH Keys on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/#Step_2_Generate_SSH_Keys_on_Ubuntu\" title=\"Step 2: Generate SSH Keys on Ubuntu\">Step 2: Generate SSH Keys on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/#Step_3_Copy_the_public_key_to_the_remote_server\" title=\"Step 3: Copy the public key to the remote server\">Step 3: Copy the public key to the remote server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/#Step_4_Test_SSH_authentication\" title=\"Step 4: Test SSH authentication\">Step 4: Test SSH authentication<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/#Step_5_Disable_password_authentication_Optional\" title=\"Step 5: Disable password authentication (Optional)\">Step 5: Disable password authentication (Optional)<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_1_Check_for_existing_SSH_Keys_on_Ubuntu\"><\/span>Step 1: Check for existing SSH Keys on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Before creating new SSH keys, we need to check whether SSH keys already exist on our system. To do this, open the terminal and type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>ls ~\/.ssh\/id_rsa*<\/code><\/pre>\n\n\n\n<p>If you get a message that says &#8220;No such file or directory,&#8221; it means that you don&#8217;t have any SSH keys on Ubuntu system. If you see files with names that start with &#8220;id_rsa,&#8221; you already have SSH keys on your system.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"173\" data-attachment-id=\"3331\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/attachment\/screenshot-2023-04-25-at-16-04-57\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.04.57.png?fit=793%2C183&amp;ssl=1\" data-orig-size=\"793,183\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-25-at-16.04.57\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.04.57.png?fit=750%2C173&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.04.57.png?resize=750%2C173&#038;ssl=1\" alt=\"How to Set Up SSH Keys on Ubuntu 20.04\" class=\"wp-image-3331\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.04.57.png?w=793&amp;ssl=1 793w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.04.57.png?resize=300%2C69&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.04.57.png?resize=768%2C177&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_2_Generate_SSH_Keys_on_Ubuntu\"><\/span>Step 2: Generate SSH Keys on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To generate SSH keys on Ubuntu, we will use the ssh-keygen command. This command generates a public and a private key pair. The private key is kept on the local computer, and the public key is uploaded to the remote server.<\/p>\n\n\n\n<p>To generate SSH keys on Ubuntu, open the terminal and type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>ssh-keygen<\/code><\/pre>\n\n\n\n<p>You will be asked to enter a file name for the <a href=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/restrict-executable-ssh-commands-with-authorized-keys\/\">SSH key<\/a>. Press Enter to accept the default file name, or enter a new file name. Next, you will be asked to enter a passphrase. The passphrase is used to encrypt the private key, so make sure to use a strong passphrase and remember it. If you leave the passphrase blank, the private key will not be encrypted, and anyone who gains access to it can use it to access the server.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"410\" data-attachment-id=\"3332\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/attachment\/screenshot-2023-04-25-at-16-06-50\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.06.50.png?fit=877%2C480&amp;ssl=1\" data-orig-size=\"877,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-25-at-16.06.50\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.06.50.png?fit=750%2C410&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.06.50.png?resize=750%2C410&#038;ssl=1\" alt=\"Generate SSH Keys on Ubuntu\" class=\"wp-image-3332\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.06.50.png?w=877&amp;ssl=1 877w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.06.50.png?resize=300%2C164&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.06.50.png?resize=768%2C420&amp;ssl=1 768w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<p>After entering the passphrase, the ssh-keygen command will generate a public and a private key pair and store them in the ~\/.ssh directory.<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>ls ~\/.ssh\/id_rsa*<br>\/root\/.ssh\/id_rsa \/root\/.ssh\/id_rsa.pub<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_3_Copy_the_public_key_to_the_remote_server\"><\/span>Step 3: Copy the public key to the remote server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Once you have generated SSH keys, you need to copy the public key to the remote server. You can do this by using the ssh-copy-id command. The ssh-copy-id command copies the public key to the remote server&#8217;s authorized_keys file.<\/p>\n\n\n\n<p>To copy the public key to the remote server, open the terminal and type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>ssh-copy-id user@remote_server<\/code><\/pre>\n\n\n\n<p>Replace &#8220;user&#8221; with your username on the remote server and &#8220;remote_server&#8221; with the IP address or hostname of the remote server. You will be prompted to enter your password for the remote server. After entering your password, the public key will be added to the authorized_keys file on the remote server.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"223\" data-attachment-id=\"3333\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-set-up-ssh-keys-on-ubuntu-20-04\/attachment\/screenshot-2023-04-25-at-16-09-38\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.09.38.png?fit=1029%2C306&amp;ssl=1\" data-orig-size=\"1029,306\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-2023-04-25-at-16.09.38\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.09.38.png?fit=750%2C223&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.09.38.png?resize=750%2C223&#038;ssl=1\" alt=\"Copy the public key to the remote server\" class=\"wp-image-3333\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.09.38.png?resize=1024%2C305&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.09.38.png?resize=300%2C89&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.09.38.png?resize=768%2C228&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-25-at-16.09.38.png?w=1029&amp;ssl=1 1029w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_4_Test_SSH_authentication\"><\/span>Step 4: Test SSH authentication<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To test whether SSH authentication is working, open the terminal and type the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>ssh user@remote_server<\/code><\/pre>\n\n\n\n<p>Replace &#8220;user&#8221; with your username on the remote server and &#8220;remote_server&#8221; with the IP address or hostname of the remote server. If SSH authentication is working, you will be logged in to the remote server without entering your password.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-header-gradient-color has-text-color\"><span class=\"ez-toc-section\" id=\"Step_5_Disable_password_authentication_Optional\"><\/span>Step 5: Disable password authentication (Optional)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you want to enhance security, you can disable password authentication and only allow SSH key authentication on the remote server. To do this, log in to the remote server and open the sshd_config file:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo nano \/etc\/ssh\/sshd_config<\/code><\/pre>\n\n\n\n<p>Find the line that says &#8220;#PasswordAuthentication yes&#8221; and remove the &#8220;#&#8221; at the beginning of the line. Then change &#8220;yes&#8221; to &#8220;no&#8221; so that it reads &#8220;PasswordAuthentication no&#8221;. Save and exit the file.<\/p>\n\n\n\n<p>Next, restart the SSH service:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background\"><code>sudo systemctl restart sshd<\/code><\/pre>\n\n\n\n<p>From now on, you will only be able to log in to the remote server using SSH keys.<\/p>\n\n\n\n<p>In this tutorial, we learned how to set up SSH keys on Ubuntu 20.04. SSH keys provide a more secure way to authenticate with a server or computer than passwords. By using SSH keys, you can securely transfer files, execute remote commands, and manage remote systems. Once you have set up SSH keys, you can disable password authentication to enhance security.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we will learn how to set up SSH keys on Ubuntu 20.04. Secure Shell (SSH) is a protocol used to securely connect to a remote server or computer. It provides a secure way to transfer files, execute remote commands, and manage remote systems. SSH keys are a<\/p>\n","protected":false},"author":8,"featured_media":3334,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3],"tags":[345,348,349,346,344,347,350],"class_list":["post-3330","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","tag-copy-the-public-key","tag-disable-password-authentication","tag-generate-ssh-keys","tag-ssh-authentication","tag-ssh-keys","tag-ssh-keys-on-ubuntu","tag-ssh-public-key"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Set-Up-SSH-Keys-on-Ubuntu-20.04.png?fit=600%2C330&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-RI","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1158,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/openssh-public-key-authentication-under-ubuntu\/","url_meta":{"origin":3330,"position":0},"title":"OpenSSH public key authentication under Ubuntu","author":"Shreyash Sharma","date":"October 24, 2017","format":false,"excerpt":"This article shows how\u00a0SSH access is\u00a0configured\u00a0for\u00a0public-key\u00a0authentication\u00a0.\u00a0To do so, a key pair is created on the client, the public part of the keys are transferred to the server, and the server is set up for key authentication.\u00a0The user can log on to the server without a login password, only the password\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1253,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/unlock-full-encrypted-system-via-ssh\/","url_meta":{"origin":3330,"position":1},"title":"Unlock full-encrypted system via SSH","author":"Daniel Draga","date":"November 9, 2017","format":false,"excerpt":"A complete encryption of your own system is an excellent way to ensure the confidentiality of your own data.\u00a0The current Ubuntu installer offers a guided installation to encrypt the entire system with \"\u00a0encrypted LVMs\u00a0\".\u00a0For both the automated installation and the manual way, there are numerous detailed guides that explain the\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/dropbear-logo-walking_700_726_FFFFFF_c1.jpg?fit=700%2C726&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/dropbear-logo-walking_700_726_FFFFFF_c1.jpg?fit=700%2C726&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/dropbear-logo-walking_700_726_FFFFFF_c1.jpg?fit=700%2C726&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/dropbear-logo-walking_700_726_FFFFFF_c1.jpg?fit=700%2C726&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1250,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/restrict-executable-ssh-commands-with-authorized-keys\/","url_meta":{"origin":3330,"position":2},"title":"Restrict executable SSH commands with authorized keys","author":"Daniel Draga","date":"November 9, 2017","format":false,"excerpt":"The\u00a0OpenSSH\u00a0Secure Shell Server provides secure, encrypted remote access to Linux and Unix systems.\u00a0The server side is the file\u00a0authozired_keys\u00a0in\u00a0.ssh\u00a0a user's primary folder to configure a\u00a0public-key authentication\u00a0.\u00a0Normally, a user gets\u00a0full access\u00a0to the system where the authentication was set up.\u00a0However, in some cases, such as automated backup operations, it makes sense to restrict\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/Putty2_1.png?fit=675%2C424&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/Putty2_1.png?fit=675%2C424&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/Putty2_1.png?fit=675%2C424&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1157,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/ssh-key-login\/","url_meta":{"origin":3330,"position":3},"title":"SSH Key Login","author":"Shreyash Sharma","date":"October 24, 2017","format":false,"excerpt":"Note:\u00a0This article applies to older SSH versions (SSH version 1).\u00a0For the latest information on SSH key logins, see\u00a0OpenSSH Public Key Authentication under Ubuntu\u00a0. SSH Config for SSH Key customize On the remote server, the \/ Etc \/ ssh \/ sshd_config to be edited.\u00a0Change the following values: current: RSAAuthentification yes New:\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/public-key-auth-workflow.png?fit=632%2C696&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/public-key-auth-workflow.png?fit=632%2C696&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/public-key-auth-workflow.png?fit=632%2C696&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3176,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-change-ssh-port-on-linux-or-unix\/","url_meta":{"origin":3330,"position":4},"title":"How to Change SSH Port on Linux or Unix","author":"George B.","date":"April 6, 2023","format":false,"excerpt":"By default, SSH listens on port 22, if you want to change SSH port to a non-standard port can help enhance server security by making it harder for attackers to find and exploit SSH vulnerabilities. In this article, we will walk through the process of changing the SSH port on\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Change-SSH-Port-on-Linux-or-Unix.png?fit=600%2C340&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Change-SSH-Port-on-Linux-or-Unix.png?fit=600%2C340&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2023\/04\/How-to-Change-SSH-Port-on-Linux-or-Unix.png?fit=600%2C340&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":1149,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/ssh-login-under-debian-with-fail2ban\/","url_meta":{"origin":3330,"position":5},"title":"SSH Login under Debian with fail2ban","author":"Shreyash Sharma","date":"October 22, 2017","format":false,"excerpt":"The tool\u00a0fail2ban\u00a0,\u00a0written in Python,\u00a0aims to secure server services against DoS attacks.\u00a0It checks log files for predefined patterns and temporarily blocks the corresponding IP addresses if the failed access is repeated.\u00a0This article shows you how to back up a Debian-based server with fail2ban.\u00a0The deployed version of fail2ban is\u00a00.9.6-2\u00a0under\u00a0Debian 9.1\u00a0. Problem In\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/fail2ban-logo2.png?fit=459%2C441&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=3330"}],"version-history":[{"count":1,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3330\/revisions"}],"predecessor-version":[{"id":3335,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/3330\/revisions\/3335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/3334"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=3330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=3330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=3330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}