{"id":3216,"date":"2023-05-22T15:52:20","date_gmt":"2023-05-22T15:52:20","guid":{"rendered":"https:\/\/sectigostore.com\/blog\/?p=3216"},"modified":"2023-07-13T12:11:47","modified_gmt":"2023-07-13T12:11:47","slug":"how-to-set-up-ssh-without-a-password-in-linux","status":"publish","type":"post","link":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/","title":{"rendered":"How to Set Up SSH Without a Password in Linux"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">SpyCloud recovered <a href=\"https:\/\/spycloud.com\/blog\/malware-is-making-its-mark-on-the-darknet\/\">721.5 million<\/a> stolen credentials from the darknet in 2022. Don\u2019t be the next victim. Go passwordless! Protect one of attackers&#8217; favorite network entry points. Discover how to log in to SSH without a password in Linux.<\/h2>\n\n\n\n<p>In 2022, Linux malware hit record numbers with Atlas VPN researchers reporting a <a href=\"https:\/\/atlasvpn.com\/blog\/new-linux-malware-hits-record-highs-in-2022-rising-by-50\">50% year-over-year<\/a> increase and a whopping 117% increase in Q4 alone. This shows that while Linux remains one of the \u201csafer\u201d options compared to other operating systems, it isn&#8217;t immune to security threats.<\/p>\n\n\n\n<p>Do you still log in to your server via secure shell (SSH) using your username and password? It could put your server and organization at risk of credential theft; login info is among the most sought items in the criminal underground marketplaces.<\/p>\n\n\n\n<p>Time to act! Learn in four easy steps how to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set up SSH private and public key-based authentication.<\/li>\n\n\n\n<li>Access your server without a password in Linux.<\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s get down to work!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Set Up Passwordless SSH in Linux in 4 Steps<\/h2>\n\n\n\n<p>I remember when I started working in web hosting. At the time, many customers were using the insecure file transfer protocol (FTP) to download and upload files to websites. Then <a href=\"https:\/\/www.oreilly.com\/library\/view\/ssh-the-secure\/0596008953\/ch01s05.html\">SSH came to light<\/a> and immediately gained popularity, becoming a virtually indispensable tool. Why? Because it was a network communication protocol that allowed the use of cryptography to:<a href=\"https:\/\/www.pcisecuritystandards.org\/glossary\/strong-cryptography\/\"><\/a><a href=\"https:\/\/sectigostore.com\/blog\/hashing-vs-encryption-the-big-players-of-the-cyber-security-world\/\"><\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Execute commands,<\/li>\n\n\n\n<li>Transfer files,<\/li>\n\n\n\n<li>Configuring remote servers, and<\/li>\n\n\n\n<li>Remotely manage systems and applications.<\/li>\n<\/ul>\n\n\n\n<p>The advantage? As the communication is encrypted, the data transmission is protected by eavesdroppers and from dangerous man-in-the-middle attacks.<\/p>\n\n\n\n<p>SSH supports several authentication methods, but the two most widely used are password-based authentication and <a href=\"https:\/\/sectigostore.com\/blog\/what-is-pki-a-laymans-guide-to-public-key-infrastructure\/\">public-key-based<\/a> authentication. With key-based authentication, you don\u2019t have to use a password (hence why it\u2019s also called passwordless SSH); it\u2019s optional. And with stolen credentials being identified by Verizon as<a href=\"https:\/\/www.verizon.com\/business\/resources\/articles\/s\/frequently-asked-questions-on-credential-theft-prevention-and-protection\/\"> the primary cause of web application breaches<\/a>, it may be wise to consider using the latter.<a href=\"https:\/\/sectigostore.com\/blog\/what-is-a-private-key-in-cybersecurity\/\"><\/a><a href=\"https:\/\/sectigostore.com\/blog\/what-is-asymmetric-encryption-how-does-it-work\/\"><\/a><\/p>\n\n\n\n<p>Want to give it a go? Setting up passwordless in Linux is easy and involves only four quick steps. For this demonstration, we&#8217;re going to use <a href=\"https:\/\/releases.ubuntu.com\/20.04.6\/\">Ubuntu 20 LTS<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Check If You Already Have an SSH Key on Your Client<\/h3>\n\n\n\n<p>Are you 100% sure you don&#8217;t have an SSH key pair already saved on your device? To play it safe, verifying that you don\u2019t before setting up SSH without a password in Linux is always better. You don&#8217;t want to end up overwriting your existing keys, right? To check for any existing keys:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open a terminal using the shortcut (i.e., hit the keys CTRL+ALT+T) or by clicking on the <strong>Show Applications<\/strong> button on the dash bar.<\/li>\n\n\n\n<li>Type <em>terminal<\/em> in the search box and select it.<strong><\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"534\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux1.png\" alt=\"A screenshot of a Linux desktop screen\" class=\"wp-image-3220\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux1.png 924w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux1-300x173.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux1-560x324.png 560w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: The screenshot shows how to open a terminal in Linux by clicking on the Show Applications button and searching for it.<\/em><\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Run the command <em><strong>ls -al ~\/.ssh\/id_*.pub<\/strong><\/em>. If you get an error message like \u201cno such file or directory\u201d or \u201cno matches found\u201d (as shown in the screenshot below), it means you don\u2019t have any SSH keys and can proceed to step 2.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"124\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux2-1024x124.png\" alt=\"A screenshot of how to setup passwordless SSH in Linux\" class=\"wp-image-3221\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux2-1024x124.png 1024w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux2-300x36.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux2-560x68.png 560w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux2-1536x187.png 1536w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux2-940x114.png 940w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux2.png 1704w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: Now that I\u2019m sure that I don\u2019t have any SSH key on my device, I can move on to the next step.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Did you find out you already had a key pair? Then you can either go directly to step 3 to continue the setup of passwordless SSH in Linux, or back up the old keys and generate new ones by following the instructions in step two.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Generate Your SSH Key Pair for Passwordless SSH in Linux<\/h3>\n\n\n\n<p>SSH keys are generated through a key generator tool. This tool uses a one-way (i.e., not reversible) mathematical formula (i.e., <a href=\"https:\/\/www.simplilearn.com\/tutorials\/data-structure-tutorial\/what-is-an-algorithm\">algorithm<\/a>) to create the public and private key pair. The tool is included in the SSH command line tool suite.<\/p>\n\n\n\n<p>To generate your key pair on your local machine:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Type <em><strong>ssh-keygen<\/strong><\/em> in the terminal you&#8217;ve opened and hit <strong>Enter<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>In this case, because we didn&#8217;t specify a particular key algorithm, it will generate <a href=\"https:\/\/sectigostore.com\/blog\/ecdsa-vs-rsa-everything-you-need-to-know\/\">Rivest\u2013Shamir\u2013Adleman<\/a> (RSA) based keys automatically. SSH supports also other algorithms like the obsolete <a href=\"https:\/\/www.simplilearn.com\/tutorials\/cryptography-tutorial\/digital-signature-algorithm\">digital signature algorithm<\/a> (DSA) and the new <a href=\"https:\/\/blog.cloudflare.com\/ecdsa-the-digital-signature-algorithm-of-a-better-internet\/\">elliptic curve digital signature algorithm<\/a> (ECDSA). However, to avoid compatibility issues, we\u2019ll use RSA for now. Should you wish to utilize a different algorithm, all you have to do is to add <em>-t<\/em> followed by the chosen algorithm name to the same command. For example, <em>ssh-keygen -t dsa.<\/em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"894\" height=\"126\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux3.png\" alt=\"A screenshot of the command that enables you to generate an SSH key in Linux\" class=\"wp-image-3222\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux3.png 894w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux3-300x42.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux3-560x79.png 560w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: By typing the command <strong>ssh-keygen<\/strong>, your key pair will be created using the default RSA algorithm.<\/em><\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once prompted, enter the path to the file where you want to store your RSA private key. To add an extra layer of security, you may want to ensure that your private key is stored in a secure location (e.g., in <a href=\"https:\/\/keepass.info\/\"><\/a><a href=\"https:\/\/sectigostore.com\/enterprise\/sectigo-certificate-manager\">Sectigo Certificate Manager<\/a>). This is a one-stop shop for all your keys and every kind of certificate that makes installation, discovery, and renewal a piece of cake. For simplicity, we&#8217;ve stuck to the default folder (i.e., <em>~\/.ssh<\/em>) in this example.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"853\" height=\"200\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux4.png\" alt=\"A screenshot of the commandline tool that shows an example of where SSH keys can be generated in Linux\" class=\"wp-image-3223\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux4.png 853w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux4-300x70.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux4-560x131.png 560w\" sizes=\"auto, (max-width: 853px) 100vw, 853px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: When you generate your keys, the system shows you your default file location. Just hit Enter to accept it.<\/em><\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next, you&#8217;ll have the option of adding another layer of security by creating a password. You don&#8217;t want to add a password? Just leave it blank and hit <strong>Enter<\/strong>. Otherwise, choose a password and type it into the terminal. Be aware that when you enter it, it&#8217;ll look like you&#8217;re not typing anything. Don&#8217;t worry, you are; not displaying what you type is just a way to hide this secret from prying eyes. Once done, you\u2019ll have to confirm it by re-entering your password. From now onward, you&#8217;ll be required to enter this password only when starting a new session.<\/li>\n<\/ul>\n\n\n\n<p><strong>Pro Tip:<\/strong> Why bother? Sometimes, developers and system admins use SSH without a password as it\u2019s handy for fully automated systems. My suggestion? Don\u2019t do that, if you can help it. Using a password here will give you an additional layer of security, and you&#8217;ll need to enter it only once at the beginning of each session anyway.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"193\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux5.png\" alt=\"A screenshot of the passphrase prompt when setting up passwordless SSH in Linux\" class=\"wp-image-3224\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux5.png 819w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux5-300x71.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux5-560x132.png 560w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: Keep your keys safe and sound from attackers by entering a password of your choice. Retype it for verification.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Congratulations! You\u2019ve just generated your key pair. As you can see, in this case, the private key (i.e., <em>id_rsa<\/em>) and public key (i.e., <em>id_rsa.pub<\/em>) are both stored under the <em>.SSH folder<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"198\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux6.png\" alt=\"A screenshot that shows the resulting SSH public key generation confirmation\" class=\"wp-image-3225\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux6.png 840w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux6-300x71.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux6-560x132.png 560w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: Once generated, the system will confirm to you in which folder the keys have been saved.<\/em><\/figcaption><\/figure>\n\n\n\n<p>The system will also show you the key fingerprint and the algorithm used (e.g., the secure algorithm <a href=\"https:\/\/sectigostore.com\/blog\/sha-256-algorithm-explained-by-a-cyber-security-consultant\/\">SHA-256<\/a>).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"698\" height=\"393\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux7.png\" alt=\"A screenshot of an example SSH key's fingerprint that can be used for passwordless SSH in Linux\" class=\"wp-image-3226\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux7.png 698w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux7-300x169.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux7-560x315.png 560w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: The systems will show you the algorithm used, its fingerprint, and the key random art image.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Want to make sure it was successful? Double-check it with the command we used in step 1: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>ls -al ~\/.ssh\/id_*.pub<\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"80\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux8-1024x80.png\" alt=\"A screenshot of a Linux keygen-related verification command\" class=\"wp-image-3227\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux8-1024x80.png 1024w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux8-300x24.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux8-560x44.png 560w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux8-940x74.png 940w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux8.png 1377w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: Now that the key pair has been generated, you shouldn\u2019t get an error message anymore when searching your system for a public key.<\/em><\/figcaption><\/figure>\n\n\n\n<p><em>Or,<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the command <em><strong>ls -l \/home\/your_username\/.ssh\/<\/strong><\/em> and check the content of the .ssh directory to find out if the public and private keys have been saved on your device.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"154\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux9.png\" alt=\"A Linux commandline example screenshot \" class=\"wp-image-3228\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux9.png 886w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux9-300x52.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux9-560x97.png 560w\" sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: If you can see the two key files as shown, it means that both your private and public keys have been generated and saved correctly on your device.<\/em><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3. Copy Your SSH Public Key<\/h3>\n\n\n\n<p>All you have to do now is to ensure that you can access the remote server without being required to enter your credentials. How do you do that? By simply copying the public key and uploading it to the server.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the terminal, type the command <em><strong>ssh-copy-id<\/strong><\/em> followed by your server\u2019s username and its IP address or hostname (as show below):<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"71\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux10-1024x71.png\" alt=\"A screenshot that shows how to copy your SSH public key in Linux\" class=\"wp-image-3229\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux10-1024x71.png 1024w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux10-300x21.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux10-560x39.png 560w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux10-940x65.png 940w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux10.png 1425w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: This is how you copy your SSH public key to your server<\/em><\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When prompted, enter the password you normally use to access the server. As before, it\u2019ll look like you aren\u2019t typing anything (this is a security protection against threats like shoulder surfing). Once authenticated, your public key will be added to the remote user-authorized keys file.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. Test Your SSH Without a Password in Linux By Logging in to Your Server<\/h3>\n\n\n\n<p>You made it! Before you start celebrating, though, it\u2019s time to test whether setting up the passwordless SSH in Linux worked. How? By trying to log in to your remote server via SSH by typing the following command into your terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>ssh server_username@server_ip_address (or hostname)<\/em><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"75\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11-1024x75.png\" alt=\"A screenshot that shows how to test your SSH key without a password in Linux\" class=\"wp-image-3230\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11-1024x75.png 1024w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11-300x22.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11-560x41.png 560w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11-1536x113.png 1536w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11-940x69.png 940w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11-1600x118.png 1600w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux11.png 1611w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: Test your passwordless SSH in Linux by logging into your server.<\/em><\/figcaption><\/figure>\n\n\n\n<p>Did you get in? Success! You didn\u2019t? Read on for some troubleshooting tips.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Troubleshooting When You Set Up of Passwordless SSH in Linux<\/h3>\n\n\n\n<p>If it didn\u2019t work, you may want to check the following:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Did You Copy the Public Key to the Correct Location?<\/h4>\n\n\n\n<p>Log in to your server using your username and password. Navigate to your remote server\u2019s home directory and verify that the public key is located in the <em>~\/.ssh\/authorized_keys<\/em> file using the command <strong><em>cat .ssh\/authorized_keys<\/em>.<\/strong><\/p>\n\n\n\n<p>If it isn&#8217;t, move it and try the passwordless login again.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Are the \u201c~\/.ssh\/\u201d Directory Permission Set to 700, and Those For \u201c~\/.ssh\/authorized_keys\u201d to 600?<\/h4>\n\n\n\n<p>Navigate to the <em>~\/.ssh <\/em>directory and verify the permissions<em>.<\/em> If they aren\u2019t set correctly, change them using the commands:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em><strong>chmod 700 ~\/.ssh<\/strong> <\/em>\u2014 Using this command prevents anyone aside from you from accessing the directory, and<\/li>\n\n\n\n<li><em><strong>chmod 600 ~\/.ssh\/authorized_keys<\/strong> <\/em>\u2014 This command ensures you&#8217;ll be the only one authorized to read and write the file.<\/li>\n<\/ul>\n\n\n\n<p>Interested in knowing more about file permissions? Akamai published a <a href=\"https:\/\/www.linode.com\/docs\/guides\/modify-file-permissions-with-chmod\/\">pretty exhaustive article<\/a> about it.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Is the SSH Server Configured on Your Remote Server to Allow Public Key Authentication?<\/h4>\n\n\n\n<p>To verify it,&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the <em>\/etc\/ssh\/sshd_config<\/em> file and open it with the editor of your choice.<\/li>\n\n\n\n<li>Check that the \u201cPubkeyAuthentication\u201d option is set to Yes. If it isn\u2019t, change it, save the file, and restart the SSH service.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Optional Step: Disable SSH Password Authentication<\/h3>\n\n\n\n<p>Want to add the ultimate security measure to your remote server connections and transform them into something as secure as the <a href=\"https:\/\/www.norad.mil\/About-NORAD\/Cheyenne-Mountain-Air-Force-Station\/\">North American Aerospace Defense Command<\/a> (NORAD) at Cheyenne Mountain? Then you\u2019ll want to disable the password authentication option from your SSH by doing the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\">\n<li>Log in to your remote server as root with the following command: <em><strong>ssh sudo_user@server_ip_address<\/strong><\/em><\/li>\n\n\n\n<li>Navigate to the SSH configuration file, usually located in the .SSH folder at <em>\/etc\/ssh\/sshd_config.<\/em><\/li>\n\n\n\n<li>Open it with your chosen editor, and set all the following entries to \u201cno\u201d:<ol><li>PasswordAuthentication.<\/li><\/ol><ol><li>ChallengeResponseAuthentication.<\/li><\/ol>\n<ol class=\"wp-block-list\">\n<li>Use<a href=\"https:\/\/www.ssh.com\/academy\/pam\/what-is-privileged-access-management\">PAM<\/a>.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Save the file and restart the SSH service with one of the following commands:<ol><li><em><strong>sudo systemctl restart ssh<\/strong><\/em> (for <a href=\"https:\/\/ubuntu.com\/server\">Ubuntu<\/a> and <a href=\"https:\/\/www.debian.org\/\">Debian<\/a> servers), or<\/li><\/ol>\n<ol class=\"wp-block-list\">\n<li><em><strong>sudo systemctl restart sshd<\/strong><\/em> (for <a href=\"https:\/\/getfedora.org\/en\/server\/\">Fedora<\/a> or <a href=\"https:\/\/www.centos.org\/centos-linux\/\">CentOS<\/a> servers).<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\n\n\n<p>Are you still wondering why you should invest some of your precious time to set up passwordless SSH in Linux, as SSH already offers a secure connection thanks to encryption? We have a few insights for you that may make you reconsider the value of what you\u2019ve just learned.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Should You Opt for Using Passwordless SSH in Linux?<\/h2>\n\n\n\n<p>For starters, credentials are the keys to your kingdom (organization) and cybercriminals are attracted to them like vampires are attracted to blood. They love to target them through phishing and man-in-the-middle attacks. But how can the bad guys steal something that isn&#8217;t there? SSH without a password in Linux takes the game to a different level:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Passwordless SSH Is Harder to Compromise Than Traditional Password-Based SSH<\/h3>\n\n\n\n<p>No matter how <a href=\"https:\/\/pages.nist.gov\/800-63-3\/sp800-63b.html\">complicated you make your passwords<\/a>, attackers have ways to nail them. And, in some cases, these compromises are simply beyond your control. Consider what happened recently to more than <a href=\"https:\/\/www.techradar.com\/news\/thousands-of-norton-lifelock-customer-accounts-hacked\">6,000 Norton LifeLock customers<\/a> and <a href=\"https:\/\/thehackernews.com\/2023\/02\/lastpass-reveals-second-attack.html\">Last Pass password vaults<\/a>.<\/p>\n\n\n\n<p>Do you have a habit of writing down your passwords or reusing them across multiple accounts? Both of these practices are bad ideas. What if you misplace those written notes or another account that uses the same password gets compromised? &#8230;Whoops! A malicious third party could find your password, and you\u2019re done.<\/p>\n\n\n\n<p>You and your admin would never do that? I\u2019m sure you wouldn\u2019t, but it does happen, as demonstrated by the latest GitGuardian report, which shows that <a href=\"https:\/\/www.gitguardian.com\/files\/the-state-of-secrets-sprawl-report-2023\">10 million credentials were leaked<\/a> by developers in GitHub commits in 2022 alone. Yikes.<\/p>\n\n\n\n<p>That\u2019s life; we all make mistakes. But some errors can be prevented by using the right defensive security techniques. How?<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\" start=\"1\">\n<li>Eliminate password-only authentication that\u2019s susceptible to brute force and phishing attacks,<\/li>\n\n\n\n<li>Ensure you securely store and protect your private keys.<\/li>\n\n\n\n<li>Adhere to <a href=\"https:\/\/sectigostore.com\/blog\/ssh-key-management-best-practices\/\">SSH key management best practices<\/a>.<\/li>\n<\/ol>\n\n\n\n<p>Because keys don&#8217;t expire, you have to take proper care of them or risk them becoming compromised. If you employ these techniques, then you mitigate many of these risks. No more passwords stolen through <a href=\"https:\/\/csrc.nist.gov\/glossary\/term\/man_in_the_middle_attack\">man-in-the-middle<\/a> or <a href=\"https:\/\/www.cloudflare.com\/learning\/bots\/brute-force-attack\/\">brute force attacks<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"573\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/passwordless-ssh-linux-1024x573.png\" alt=\"An illustration that shows how passwordless SSH can help protect your  account when using Linux\" class=\"wp-image-3219\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/passwordless-ssh-linux-1024x573.png 1024w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/passwordless-ssh-linux-300x168.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/passwordless-ssh-linux-560x313.png 560w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/passwordless-ssh-linux-940x526.png 940w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/passwordless-ssh-linux.png 1047w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: Passwordless SSH in Linux can protect you from man-in-the-middle attacks aimed at stealing your credentials to log in to your remote server.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"521\" src=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/linux-passwordless-ssh.png\" alt=\"An illustration that shows how SSH without a password in Linux helps to protect your account and resources against brute force attacks\" class=\"wp-image-3218\" srcset=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/linux-passwordless-ssh.png 1010w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/linux-passwordless-ssh-300x155.png 300w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/linux-passwordless-ssh-560x289.png 560w, https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/linux-passwordless-ssh-940x485.png 940w\" sizes=\"auto, (max-width: 1010px) 100vw, 1010px\" \/><figcaption class=\"wp-element-caption\"><em>Image caption: Even if the cybercriminal has the correct credentials, if you have disabled password authentication, they won&#8217;t be able to access your server.<\/em><\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2. Passwordless SSH Is Convenient to Use<\/h3>\n\n\n\n<p>Do you know why many developers save their project usernames and passwords in their commits? They do it for the same reason you might be tempted to use the same password on multiple websites: convenience. But convenience in these two cases can cost you a pretty penny if attackers manage to get access to your credentials. According to IBM, this can cost you <a href=\"https:\/\/www.ibm.com\/reports\/data-breach\">$150,000 more<\/a> than the average cost of a data breach (which already cost an average of $4.35 million per breach for organizations globally in 2022).<\/p>\n\n\n\n<p>Implementing SSH without a password in Linux will give you the highest level of convenience. But it&#8217;ll also eliminate the risk of your credentials being stolen whenever you log in to your remote server. How? Well, when you start a session, you won\u2019t have to enter them anymore.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. SSH Without a Password in Linux Is Easy to Manage<\/h3>\n\n\n\n<p>Have you ever tried to count how many different passwords you must remember (and change from time to time)? I\u2019ve counted mine and, believe it or not, I found out that I have more than 85 different accounts and passwords. This is massive! Do I remember all of them? Not a chance. There isn\u2019t enough space in my little head for such a huge amount of gobbledygook.<\/p>\n\n\n\n<p>With passwordless SSH in Linux, you&#8217;ll reduce the number of credentials to remember, and you won&#8217;t have to worry about changing the password regularly.<\/p>\n\n\n\n<p>But what if you forget old, discarded keys somewhere and a cybercriminal finds them? (This is possible if you don\u2019t properly manage your keys since they don\u2019t expire.) This means that the bad guys who find them could still use them to access your server. That could be a problem. The solution? Another passwordless option that we\u2019re going to briefly explore next.<\/p>\n\n\n\n<p>If you want to explore more reasons why you should go for passwordless authentication in general, don\u2019t miss our deep dive <a href=\"https:\/\/sectigostore.com\/blog\/the-pros-and-cons-of-passwordless-authentication\/\">article about its pro and cons<\/a>.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Thoughts on How to Set Up SSH Without a Password in Linux<\/h2>\n\n\n\n<p>Linux is gaining popularity among server administrators as a highly secure operating system. However, popularity inevitably attracts also unwanted attention. In fact, as more and more organizations are opting for Linux servers and platforms, the interest of cybercriminals looking to expand their hunting territory is waking up, too.<\/p>\n\n\n\n<p>Setting up passwordless SSH in Linux and disabling traditional username and password-based authentication on your remote servers will help you double up on security and give you some peace of mind.<\/p>\n\n\n\n<p>Yes, we all know that in cybersecurity, nothing is unbreakable (no matter how secure you think it is). But, by following the four steps listed in this article, you&#8217;ll slam another door in the face of potential attackers and learn something new. And this is priceless.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SpyCloud recovered 721.5 million stolen credentials from the darknet in 2022. Don\u2019t be the next victim. Go passwordless! Protect one of attackers&#8217; favorite network entry points. Discover how to log&#8230;<\/p>\n","protected":false},"author":23,"featured_media":3234,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,9],"tags":[136,290,215,289],"class_list":["post-3216","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cyber-security","category-encryption","tag-passwordless-authentication","tag-passwordless-ssh","tag-ssh","tag-ssh-security","post-with-tags"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Set Up SSH Without a Password in Linux - InfoSec Insights<\/title>\n<meta name=\"description\" content=\"Learn how to set up SSH without a password in Linux, a more secure and convenient way to access your server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set Up SSH Without a Password in Linux - InfoSec Insights\" \/>\n<meta property=\"og:description\" content=\"Learn how to set up SSH without a password in Linux, a more secure and convenient way to access your server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"InfoSec Insights\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-22T15:52:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-13T12:11:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux-feature.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1601\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nadia Bonini\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nadia Bonini\" \/>\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\":\"Article\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/\"},\"author\":{\"name\":\"Nadia Bonini\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/f4ce6500b99e7563f71f0d1d6394f135\"},\"headline\":\"How to Set Up SSH Without a Password in Linux\",\"datePublished\":\"2023-05-22T15:52:20+00:00\",\"dateModified\":\"2023-07-13T12:11:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/\"},\"wordCount\":2719,\"image\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/ssh-without-password-linux-feature.jpg\",\"keywords\":[\"passwordless authentication\",\"Passwordless SSH\",\"SSH\",\"SSH Security\"],\"articleSection\":[\"Cyber Security\",\"Encryption\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/\",\"name\":\"How to Set Up SSH Without a Password in Linux - InfoSec Insights\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/ssh-without-password-linux-feature.jpg\",\"datePublished\":\"2023-05-22T15:52:20+00:00\",\"dateModified\":\"2023-07-13T12:11:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/f4ce6500b99e7563f71f0d1d6394f135\"},\"description\":\"Learn how to set up SSH without a password in Linux, a more secure and convenient way to access your server.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/ssh-without-password-linux-feature.jpg\",\"contentUrl\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/ssh-without-password-linux-feature.jpg\",\"width\":1601,\"height\":1000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/how-to-set-up-ssh-without-a-password-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set Up SSH Without a Password in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/\",\"name\":\"InfoSec Insights\",\"description\":\"SectigoStore.com Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sectigostore.com\\\/blog\\\/#\\\/schema\\\/person\\\/f4ce6500b99e7563f71f0d1d6394f135\",\"name\":\"Nadia Bonini\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/871770d58b7b0abd48f90fb2f9643895c766b7ab6c1d4fa58e3651941cdc9e63?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/871770d58b7b0abd48f90fb2f9643895c766b7ab6c1d4fa58e3651941cdc9e63?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/871770d58b7b0abd48f90fb2f9643895c766b7ab6c1d4fa58e3651941cdc9e63?s=96&d=mm&r=g\",\"caption\":\"Nadia Bonini\"},\"description\":\"Nadia is a technical writer with more than 15 years of experience in IT, software development projects, email and cybersecurity. She has worked for leaders in the IT industry and Fortune 500 companies. A Certified CSPO mail application security product owner and a former application security engineer, she also works as a professional translator. She is a big fan of Ubuntu, traveling and Japan.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set Up SSH Without a Password in Linux - InfoSec Insights","description":"Learn how to set up SSH without a password in Linux, a more secure and convenient way to access your server.","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:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Set Up SSH Without a Password in Linux - InfoSec Insights","og_description":"Learn how to set up SSH without a password in Linux, a more secure and convenient way to access your server.","og_url":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/","og_site_name":"InfoSec Insights","article_published_time":"2023-05-22T15:52:20+00:00","article_modified_time":"2023-07-13T12:11:47+00:00","og_image":[{"width":1601,"height":1000,"url":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux-feature.jpg","type":"image\/jpeg"}],"author":"Nadia Bonini","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nadia Bonini","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/#article","isPartOf":{"@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/"},"author":{"name":"Nadia Bonini","@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/f4ce6500b99e7563f71f0d1d6394f135"},"headline":"How to Set Up SSH Without a Password in Linux","datePublished":"2023-05-22T15:52:20+00:00","dateModified":"2023-07-13T12:11:47+00:00","mainEntityOfPage":{"@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/"},"wordCount":2719,"image":{"@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux-feature.jpg","keywords":["passwordless authentication","Passwordless SSH","SSH","SSH Security"],"articleSection":["Cyber Security","Encryption"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/","url":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/","name":"How to Set Up SSH Without a Password in Linux - InfoSec Insights","isPartOf":{"@id":"https:\/\/sectigostore.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux-feature.jpg","datePublished":"2023-05-22T15:52:20+00:00","dateModified":"2023-07-13T12:11:47+00:00","author":{"@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/f4ce6500b99e7563f71f0d1d6394f135"},"description":"Learn how to set up SSH without a password in Linux, a more secure and convenient way to access your server.","breadcrumb":{"@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/#primaryimage","url":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux-feature.jpg","contentUrl":"https:\/\/sectigostore.com\/blog\/wp-content\/uploads\/2023\/05\/ssh-without-password-linux-feature.jpg","width":1601,"height":1000},{"@type":"BreadcrumbList","@id":"https:\/\/sectigostore.com\/blog\/how-to-set-up-ssh-without-a-password-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sectigostore.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Set Up SSH Without a Password in Linux"}]},{"@type":"WebSite","@id":"https:\/\/sectigostore.com\/blog\/#website","url":"https:\/\/sectigostore.com\/blog\/","name":"InfoSec Insights","description":"SectigoStore.com Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sectigostore.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sectigostore.com\/blog\/#\/schema\/person\/f4ce6500b99e7563f71f0d1d6394f135","name":"Nadia Bonini","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/871770d58b7b0abd48f90fb2f9643895c766b7ab6c1d4fa58e3651941cdc9e63?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/871770d58b7b0abd48f90fb2f9643895c766b7ab6c1d4fa58e3651941cdc9e63?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/871770d58b7b0abd48f90fb2f9643895c766b7ab6c1d4fa58e3651941cdc9e63?s=96&d=mm&r=g","caption":"Nadia Bonini"},"description":"Nadia is a technical writer with more than 15 years of experience in IT, software development projects, email and cybersecurity. She has worked for leaders in the IT industry and Fortune 500 companies. A Certified CSPO mail application security product owner and a former application security engineer, she also works as a professional translator. She is a big fan of Ubuntu, traveling and Japan."}]}},"_links":{"self":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/3216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/comments?post=3216"}],"version-history":[{"count":5,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/3216\/revisions"}],"predecessor-version":[{"id":3260,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/posts\/3216\/revisions\/3260"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/media\/3234"}],"wp:attachment":[{"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/media?parent=3216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/categories?post=3216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sectigostore.com\/blog\/wp-json\/wp\/v2\/tags?post=3216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}