{"id":1333,"date":"2016-03-21T14:29:43","date_gmt":"2016-03-21T13:29:43","guid":{"rendered":"https:\/\/www.nullalo.com\/?p=1333"},"modified":"2025-10-22T10:15:50","modified_gmt":"2025-10-22T08:15:50","slug":"linux-passwordless-ssh-login-using-private-keys","status":"publish","type":"post","link":"https:\/\/www.nullalo.com\/en\/linux-passwordless-ssh-login-using-private-keys\/","title":{"rendered":"Linux: passwordless SSH login using private keys"},"content":{"rendered":"<p><\/p>\n<p style=\"text-align: justify;\">In case you don&#8217;t know, Secure Shell (<strong>SSH<\/strong>) is a UNIX-based command interface and protocol for securely getting access to a remote computer.\u00a0Default method for SSH access is <strong>password-based authentication<\/strong>: by knowing a remote system\u00a0user&#8217;s\u00a0username and password, you can login into the system.<\/p>\n<p style=\"text-align: justify;\">Using <strong>private\/public key pairs<\/strong> instead of (or in addition to) password authentication is a convenient, fast and potentially <strong>more secure<\/strong> way to access a remote system, and it&#8217;s very simple to achieve.<\/p>\n<p style=\"text-align: justify;\">So, let&#8217;s see how to\u00a0configure a\u00a0SSH login between a client and CentOS Linux server (the procedure is the same with other distributions, maybe with some small difference) without a password using a private key.<\/p>\n<p>&nbsp;<\/p>\n<h3>1. Check for existing key pairs<\/h3>\n<p style=\"text-align: justify;\">First of all, let&#8217;s check if your client\u00a0already got a key pair you can use. Assuming you have a Linux client, log into your system (client) and type:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&#x5B;fsicurezza@localhost ~]# ls ~\/.ssh<\/pre>\n<p style=\"text-align: justify;\">If you&#8217;re on a Mac, you&#8217;ll find these keys in the &#8220;.ssh&#8221; subfolder of\u00a0your home directory (~.\/ssh\/), while on Windows you should look in %USERPROFILE%\\.ssh (C:\\Documents and Settings\\your-username\\.ssh\\ or C:\\Users\\your-username\\.ssh depending on your Windows version).<\/p>\n<p style=\"text-align: justify;\">If a file named &#8220;id_rsa.pub&#8221; or &#8220;id_dsa.pub&#8221; is listed, you already have a key. In this case, skip to step 3.<\/p>\n<h3>2. Generate a new key pair<\/h3>\n<p style=\"text-align: justify;\">Log into your local system (client) and generate your private key using the command \u201c\/usr\/bin\/ssh-keygen\u201d with some parameters. Using the\u00a0&#8220;-t&#8221; flag, we demand an &#8220;RSA&#8221; type key, which is one of the newest and safest types. With the &#8220;-C&#8221; flag, we provide a comment (which you can think of as a kind of description or label for this key): using your email address lets you identify it more easily later.\u00a0After confirming this command, you&#8217;ll be asked to:<\/p>\n<ul>\n<li style=\"text-align: justify;\">Enter a name for this new key &#8211; just hit ENTER\u00a0to accept the default name and location.<\/li>\n<li style=\"text-align: justify;\">Provide a passphrase &#8211; although SSH public key authentication can be used safely without any password, you should nonetheless enter a strong passphrase (with many characters of different type) to enhance security even further.<\/li>\n<\/ul>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&#x5B;fsicurezza@localhost ~]# ssh-keygen -t rsa -C &quot;fsicurezza@nullalo.com&quot;\r\nGenerating public\/private rsa key pair.\r\nEnter file in which to save the key (\/root\/.ssh\/id_rsa):\r\nEnter passphrase (empty for no passphrase):\r\nEnter same passphrase again:\r\nYour identification has been saved in \/root\/.ssh\/id_rsa.\r\nYour public key has been saved in \/root\/.ssh\/id_rsa.pub.\r\nThe key fingerprint is:\r\n04:53:39:ff:53:33:b7:d0:b7:7b:39:fa:32:e3:60:d9 fsicurezza@nullalo.com\r\nThe key's randomart image is:\r\n+--&#x5B; RSA 2048]----+\r\n|      o...       |\r\n|       oo        |\r\n|        .o    .  |\r\n|       .  .  .+.o|\r\n|        S  . ..++|\r\n|            =  o |\r\n|           + E  o|\r\n|          . .+ +.|\r\n|            .o*.o|\r\n+-----------------+<\/pre>\n<p style=\"text-align: justify;\">On Windows, you can use <strong><a href=\"https:\/\/the.earth.li\/~sgtatham\/putty\/latest\/x86\/puttygen.exe\" target=\"_blank\">PuTTY<wbr \/>gen<\/a><\/strong>\u00a0to generate your key pair. Simply run puttygen.exe, choose the\u00a0type of key to generate (default SSH-2 RSA option is ok) and click on &#8220;Generate&#8221;:<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1341\" src=\"\/wp-content\/uploads\/2016\/03\/puttygen_01.jpg\" alt=\"puttygen_01\" width=\"493\" height=\"478\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/puttygen_01.jpg 493w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/puttygen_01-300x291.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/puttygen_01-360x349.jpg 360w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/p>\n<p style=\"text-align: justify;\">Move your mouse to generate random data, then fill &#8220;Key comment&#8221;, &#8220;Key passphrase&#8221; and &#8220;Confirm passphrase&#8221; fields with the same date explained above.<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1342\" src=\"\/wp-content\/uploads\/2016\/03\/puttygen_02.jpg\" alt=\"puttygen_02\" width=\"493\" height=\"478\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/puttygen_02.jpg 493w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/puttygen_02-300x291.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/puttygen_02-360x349.jpg 360w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/p>\n<p style=\"text-align: justify;\">Now\u00a0save both public and private keys in <strong>%USERPROFILE%\\.ssh\\<\/strong>, using <strong>id_rsa<\/strong> as name for <strong>private key<\/strong> and <strong>id_rsa.pub<\/strong> for <strong>public key<\/strong>. Since we&#8217;re going to use OpenSSH format for key pair, to save private key use &#8220;Conversions-&gt;Export OpenSSH key&#8221;, while for public key simply copy and paste content of the &#8220;Public key for pasting into OpenSSH authorized_keys file&#8221; box into an emply id_rsa.pub file.<\/p>\n<p style=\"text-align: justify;\"><strong>NOTE: if you plan to use PuTTY for SSH login\u00a0to your server, you need to save private key in .ppk format, by clicking on &#8220;Save private key&#8221; button.<\/strong><\/p>\n<p style=\"text-align: justify;\">You can also use <strong><a href=\"https:\/\/www.bitvise.com\/ssh-client-download\" target=\"_blank\">Bitvise Tunnelier<\/a><\/strong> to generate your key pair: in that case, keys will be stored in\u00a0HKEY_CURRENT_USER\\Software\\Bitvise\\HostKeys registry key, but you can use the software to export them\u00a0as files into another location.<\/p>\n<p style=\"text-align: justify;\">We have now a\u00a0private and public key set that, as already mentioned above, on Linux\u00a0are typically created as \/home\/your-username\/.ssh\/id_rsa (<strong>private key<\/strong>) and \/home\/your-username\/.ssh\/id_rsa.pub (<strong>public key<\/strong>), on Mac you&#8217;ll find these in the &#8220;.ssh&#8221; subfolder inside your home directory (~.\/ssh\/), and on Windows they are usually stored in %USERPROFILE%\\.ssh\\.<\/p>\n<p style=\"text-align: justify;\">Your private key is an extremely valuable file, it\u2019s like storing your password in a file. If obtained, it could be used by someone else\u00a0to access your systems, so back it up and keep it safe.<\/p>\n<p style=\"text-align: justify;\">If you take a look at the actual contents of your public key file, you&#8217;ll see something like this:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&#x5B;fsicurezza@localhost ~]# cat ~\/.ssh\/id_rsa.pub\r\nssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAiqxKKnDeav9gM7By0IdECGlVjWKvvSwKtOlmdYwbFYra2F\/EAVuOqL2KsTE rVE0QzONIo7c854oADlw6UQKjkCfxDrk61ph1yUVgZeI3LeZpILPNhcSndp0I0eMBehQIPYQ2ibBhr+sUt7akSRDAKh\/mLQ 8MW2Ety1n26D3EmzUyFVWYA6Ccw6LtJocb\/29\/pqt6FpRUIfFc4TNfSJ4eOjcrc2+yL\/b3H0p1ENqlenQT6lxDBbPlNRee+ UzjdDrSvmMP8f7bQVht4QzcCjrHUPa4BjUoDPkGAEDcywqIkJuNBzTYcwaPpK7QwS9lQ8lVCdtDAtRLfAkvqjMc8vLRvQ== fsicurezza@nullalo.com<\/pre>\n<p>&nbsp;<\/p>\n<h3>3. Share your public key<\/h3>\n<p style=\"text-align: justify;\">To use your private key, you must share your public key with a remote server. Simply put, the remote server keeps a copy of your public key, which it uses to match against your private key when you attempt to login.<\/p>\n<p style=\"text-align: justify;\">On Linux, there is a utility which automatically installs our public key onto a remote host: <strong>ssh-copy-id<\/strong>. Let&#8217;s say you know the password of the &#8220;admin&#8221; account on &#8220;nullalo.com&#8221; server, on which you want to share your public key. In this case we will type:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&#x5B;fsicurezza@localhost ~]# ssh-copy-id -i \/home\/fsicurezza\/.ssh\/id_rsa admin@nullalo.com\r\nadmin@nullalo.com's password:\r\n&#x5B;fsicurezza@localhost ~]#<\/pre>\n<p>You can also paste the key using SSH:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&#x5B;fsicurezza@localhost ~]# cat ~\/.ssh\/id_rsa.pub | ssh admin@nullalo.com &quot;mkdir -p ~\/.ssh &amp;&amp; cat &gt;&gt;  ~\/.ssh\/authorized_keys&quot;<\/pre>\n<p style=\"text-align: justify;\">If you want to do it manually, the concept is that <\/span><strong style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 1.5;\">\/home\/your-username\/.ssh\/authorized_keys<\/strong><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 1.5;\"> (on some systems file name is <\/span><strong style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 1.5;\">authorized_keys2<\/strong><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 1.5;\">) file on the remote server must contain a row for each allowed\u00a0client&#8217;s public key.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>4. Additional security<\/h3>\n<p>Once you have copied your SSH public key\u00a0on\u00a0your server and ensured that you can log in with the SSH keys alone, you can go ahead and restrict the root login to only be permitted via SSH keys.<\/p>\n<p>In order to do this, open up the SSH config file:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">sudo nano \/etc\/ssh\/sshd_config<\/pre>\n<p>Within that file, find the line that includes PermitRootLogin and modify it to ensure that users can only connect with their SSH key. If the line does not exist or is commented, simply add it:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">PermitRootLogin without-password<\/pre>\n<p>Reload service to put the changes into effect:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">service sshd reload<\/pre>\n<p>&nbsp;<\/p>\n<h3>5a. Login with no Password from\u00a0Linux client<\/h3>\n<p>Assuming you\u2019ve followed the above steps, now you can access remote server simply typing:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">&#x5B;fsicurezza@localhost ~]# ssh admin@nullalo.com\r\n\r\nLast login: Mon Mar 21 10:28:33 2016 from 192.168.0.1\r\n\r\n&#x5B;admin@nullalo.com ~]#<\/pre>\n<p>with\u00a0no password entry required, except for passphrase if you used it during key pair\u00a0generation.<\/p>\n<p>&nbsp;<\/p>\n<h3>5b. Login with no Password from Windows using Bitvise Tunnelier as\u00a0client<\/h3>\n<p>On Windows, we can use\u00a0<strong><a href=\"https:\/\/www.bitvise.com\/ssh-client-download\" target=\"_blank\">Bitvise Tunnelier<\/a><\/strong>\u00a0or <strong><a href=\"https:\/\/the.earth.li\/~sgtatham\/putty\/latest\/x86\/putty.exe\" target=\"_blank\">PuTTY<\/a><\/strong> to access via SSH to our server.<\/p>\n<p>With <strong>Bitvise Tunnelier<\/strong>, you need to import your private key by clicking on &#8220;<strong>Client key manager<\/strong>&#8220;, then &#8220;Import&#8221; and finally select your &#8220;id_rsa&#8221; file.<\/p>\n<p>You will be asked for passphrase, if used during key pair creation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1347\" src=\"\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_01.jpg\" alt=\"bitvise_tunnelier_01\" width=\"265\" height=\"130\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1348\" src=\"\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_02.jpg\" alt=\"bitvise_tunnelier_02\" width=\"780\" height=\"350\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_02.jpg 780w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_02-300x135.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_02-768x345.jpg 768w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_02-360x162.jpg 360w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_02-750x337.jpg 750w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>Now you can login by selecting <strong>publickey<\/strong> as &#8220;Initial method&#8221; and choosing the right\u00a0Client key (in the example the one named &#8220;Profile 2&#8221;).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1349\" src=\"\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_03.jpg\" alt=\"bitvise_tunnelier_03\" width=\"646\" height=\"650\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_03.jpg 646w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_03-150x150.jpg 150w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_03-298x300.jpg 298w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_03-360x362.jpg 360w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_03-60x60.jpg 60w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_03-200x200.jpg 200w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\" \/><\/p>\n<p>After clicking on &#8220;Login&#8221;, you will be asked to save the host key (only for the first connection):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1350\" src=\"\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_04.jpg\" alt=\"bitvise_tunnelier_04\" width=\"403\" height=\"371\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_04.jpg 403w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_04-300x276.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_04-360x331.jpg 360w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/p>\n<p>Click on &#8220;Accept and Save&#8221;, then you&#8217;ll be asked for public key&#8217;s passphrase (this\u00a0is the password of the key pair, NOT\u00a0the password of the user logging in)\u00a0if needed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1351\" src=\"\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_05.jpg\" alt=\"bitvise_tunnelier_05\" width=\"286\" height=\"285\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_05.jpg 286w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_05-150x150.jpg 150w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_05-60x60.jpg 60w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/bitvise_tunnelier_05-200x200.jpg 200w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/p>\n<p>If everything&#8217;s ok, you will be logged onto remote server.<\/p>\n<h3><\/h3>\n<h3>5c. Login with no Password from Windows using PuTTY\u00a0as\u00a0client<\/h3>\n<p style=\"text-align: justify;\">If you wish to use\u00a0<strong>PuTTY<\/strong> as client\u00a0instead of Bitvise Tunnelier, you have to specify the location of your client&#8217;s private key (that matches the public key you stored on the server in the authorized_keys file) in Connection-&gt;SSH-&gt;Auth-&gt;Private key file for authentication.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1346\" src=\"\/wp-content\/uploads\/2016\/03\/putty_01.jpg\" alt=\"putty_01\" width=\"466\" height=\"449\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_01.jpg 466w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_01-300x289.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_01-360x347.jpg 360w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><\/p>\n<p><strong>NOTE: Private key must be stored in .ppk format if you want to use it with PuTTY.<\/strong><\/p>\n<p>Now just fill in your connection details (Host Name or IP address and Port) and click &#8220;Open&#8221;:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1352\" src=\"\/wp-content\/uploads\/2016\/03\/putty_02.jpg\" alt=\"putty_02\" width=\"466\" height=\"449\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_02.jpg 466w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_02-300x289.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_02-360x347.jpg 360w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><\/p>\n<p>After the warning about the server&#8217;s host key not being cached in the registry (you can answer &#8220;Yes&#8221;):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1353\" src=\"\/wp-content\/uploads\/2016\/03\/putty_03.jpg\" alt=\"putty_03\" width=\"445\" height=\"305\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_03.jpg 445w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_03-300x206.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_03-360x247.jpg 360w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/p>\n<p>you will be asked for username (in our example, &#8220;admin&#8221;) and eventually for key pair&#8217;s passphrase, then you&#8217;ll be logged into the system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1354\" src=\"\/wp-content\/uploads\/2016\/03\/putty_04.jpg\" alt=\"putty_04\" width=\"675\" height=\"425\" srcset=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_04.jpg 675w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_04-300x189.jpg 300w, https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/putty_04-360x227.jpg 360w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/p>\n<p>That&#8217;s it! If you have any question, please don&#8217;t esitate to add a comment to this article.<\/p>","protected":false},"excerpt":{"rendered":"<p>In case you don&#8217;t know, Secure Shell (SSH) is a UNIX-based command interface and protocol for securely getting access to a remote computer.\u00a0Default method for SSH access is password-based authentication: by knowing a remote system\u00a0user&#8217;s\u00a0username and password, you can login into the system. Using private\/public key pairs instead of (or<\/p>\n","protected":false},"author":2,"featured_media":1337,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[97,107,106],"class_list":["post-1333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-teaser","tag-centos","tag-login","tag-ssh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux: passwordless SSH login using private keys - Nullalo!<\/title>\n<meta name=\"description\" content=\"Let&#039;s see how to configure a SSH login between a client and Linux server without a password using a private key.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.nullalo.com\/?p=1333\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux: passwordless SSH login using private keys - Nullalo!\" \/>\n<meta property=\"og:description\" content=\"[:it]Vediamo come configurare una login SSH tra un client e un server Linux senza password utilizzando una chiave privata.[:en]Let&#039;s see how to configure a SSH login between a client and Linux server without a password using a private key.[:]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.nullalo.com\/?p=1333\" \/>\n<meta property=\"og:site_name\" content=\"Nullalo!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/nullalo\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fulvio.sicurezza\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-21T13:29:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-22T08:15:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1140\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fulvio Sicurezza\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/FulvioSicurezza\" \/>\n<meta name=\"twitter:site\" content=\"@Nullalo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fulvio Sicurezza\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.nullalo.com\/?p=1333\",\"url\":\"https:\/\/www.nullalo.com\/?p=1333\",\"name\":\"[:it]Linux: accesso SSH senza password con chiavi private[:en]Linux: passwordless SSH login using private keys[:] - Nullalo!\",\"isPartOf\":{\"@id\":\"https:\/\/www.nullalo.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=1333#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=1333#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg\",\"datePublished\":\"2016-03-21T13:29:43+00:00\",\"dateModified\":\"2025-10-22T08:15:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c\"},\"description\":\"[:it]Vediamo come configurare una login SSH tra un client e un server Linux senza password utilizzando una chiave privata.[:en]Let's see how to configure a SSH login between a client and Linux server without a password using a private key.[:]\",\"breadcrumb\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=1333#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.nullalo.com\/?p=1333\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nullalo.com\/?p=1333#primaryimage\",\"url\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg\",\"contentUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg\",\"width\":1140,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.nullalo.com\/?p=1333#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.nullalo.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux: accesso SSH senza password con chiavi private\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.nullalo.com\/#website\",\"url\":\"https:\/\/www.nullalo.com\/\",\"name\":\"Nullalo!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.nullalo.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c\",\"name\":\"Fulvio Sicurezza\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg\",\"contentUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg\",\"caption\":\"Fulvio Sicurezza\"},\"sameAs\":[\"http:\/\/www.generalservice.na.it\",\"https:\/\/www.facebook.com\/fulvio.sicurezza\",\"http:\/\/it.linkedin.com\/in\/fulviosicurezza\",\"https:\/\/x.com\/https:\/\/twitter.com\/FulvioSicurezza\",\"https:\/\/www.youtube.com\/c\/FulvioSicurezzaIT\"],\"url\":\"https:\/\/www.nullalo.com\/en\/author\/f-sicurezza\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux: passwordless SSH login using private keys - Nullalo!","description":"Let's see how to configure a SSH login between a client and Linux server without a password using a private key.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.nullalo.com\/?p=1333","og_locale":"en_US","og_type":"article","og_title":"Linux: passwordless SSH login using private keys - Nullalo!","og_description":"[:it]Vediamo come configurare una login SSH tra un client e un server Linux senza password utilizzando una chiave privata.[:en]Let's see how to configure a SSH login between a client and Linux server without a password using a private key.[:]","og_url":"https:\/\/www.nullalo.com\/?p=1333","og_site_name":"Nullalo!","article_publisher":"https:\/\/www.facebook.com\/nullalo","article_author":"https:\/\/www.facebook.com\/fulvio.sicurezza","article_published_time":"2016-03-21T13:29:43+00:00","article_modified_time":"2025-10-22T08:15:50+00:00","og_image":[{"width":1140,"height":600,"url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg","type":"image\/jpeg"}],"author":"Fulvio Sicurezza","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/FulvioSicurezza","twitter_site":"@Nullalo","twitter_misc":{"Written by":"Fulvio Sicurezza","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.nullalo.com\/?p=1333","url":"https:\/\/www.nullalo.com\/?p=1333","name":"[:it]Linux: accesso SSH senza password con chiavi private[:en]Linux: passwordless SSH login using private keys[:] - Nullalo!","isPartOf":{"@id":"https:\/\/www.nullalo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.nullalo.com\/?p=1333#primaryimage"},"image":{"@id":"https:\/\/www.nullalo.com\/?p=1333#primaryimage"},"thumbnailUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg","datePublished":"2016-03-21T13:29:43+00:00","dateModified":"2025-10-22T08:15:50+00:00","author":{"@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c"},"description":"[:it]Vediamo come configurare una login SSH tra un client e un server Linux senza password utilizzando una chiave privata.[:en]Let's see how to configure a SSH login between a client and Linux server without a password using a private key.[:]","breadcrumb":{"@id":"https:\/\/www.nullalo.com\/?p=1333#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.nullalo.com\/?p=1333"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nullalo.com\/?p=1333#primaryimage","url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg","contentUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2016\/03\/security.jpg","width":1140,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.nullalo.com\/?p=1333#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.nullalo.com\/"},{"@type":"ListItem","position":2,"name":"Linux: accesso SSH senza password con chiavi private"}]},{"@type":"WebSite","@id":"https:\/\/www.nullalo.com\/#website","url":"https:\/\/www.nullalo.com\/","name":"Nullalo!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.nullalo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c","name":"Fulvio Sicurezza","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/image\/","url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg","contentUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg","caption":"Fulvio Sicurezza"},"sameAs":["http:\/\/www.generalservice.na.it","https:\/\/www.facebook.com\/fulvio.sicurezza","http:\/\/it.linkedin.com\/in\/fulviosicurezza","https:\/\/x.com\/https:\/\/twitter.com\/FulvioSicurezza","https:\/\/www.youtube.com\/c\/FulvioSicurezzaIT"],"url":"https:\/\/www.nullalo.com\/en\/author\/f-sicurezza\/"}]}},"_links":{"self":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/1333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/comments?post=1333"}],"version-history":[{"count":1,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/1333\/revisions"}],"predecessor-version":[{"id":1938,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/1333\/revisions\/1938"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/media\/1337"}],"wp:attachment":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/media?parent=1333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/categories?post=1333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/tags?post=1333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}