{"id":143,"date":"2022-04-12T23:24:29","date_gmt":"2022-04-12T21:24:29","guid":{"rendered":"https:\/\/linowebserver.org\/?page_id=143"},"modified":"2022-04-12T23:24:29","modified_gmt":"2022-04-12T21:24:29","slug":"how-to-ssh-passwordless-login","status":"publish","type":"page","link":"https:\/\/linowebserver.org\/index.php\/how-to\/how-to-ssh-passwordless-login\/","title":{"rendered":"How to: SSH Passwordless Login"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1. Check for existing SSH Key<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -al ~\/.ssh\/id_*.pub<\/code><\/pre>\n\n\n\n<p>if there are existing keys, u can either those ans skip the next step.<br><br>if u got an output with &#8222;No such file or directory or no matches found&#8220; that means that u do not have an SSH Key . U must generate a new one., proceed with the next step <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Generate a new SSH Key pair<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ this generates a 4096 bits SSH Key pair\nssh-keygen -t rsa -b 4096 -C \"your_email@domain.com\"\n\n\/\/ Press Enter to accept the default location and name\n# Output: \n# Enter file in which to save the key (\/home\/yourusername\/.ssh\/id_rsa):\n\n\/\/ Press Enter otherwise u can't startup fully automated processes \n# Output:\n# Enter passphrase (empty for no passphrase):\n\n\/\/to be sure that SSH Keey are generated\nls ~\/.ssh\/id_*\n\n# Output:\n# \/home\/yourusername\/.ssh\/id_rsa \n# \/home\/yourusername\/.ssh\/id_rsa.pub<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Copy the public Key<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/The easy was to copy:\nssh-copy-id remote_username@server_ip_address\n\n\/\/The hard way to copy \ncat ~\/.ssh\/id_rsa.pub | ssh remote_username@server_ip_address \"mkdir -p ~\/.ssh &amp;&amp; chmod 700 ~\/.ssh &amp;&amp; cat >> ~\/.ssh\/authorized_keys &amp;&amp; chmod 600 ~\/.ssh\/authorized_keys\"\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. Login in your Server using SSH Keys<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh remote_username@server_ip_address<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Check for existing SSH Key if there are existing keys, u can either those ans skip the next step. if u got an output with &#8222;No such file or directory or no matches found&#8220; that means that u do not have an SSH Key . U must generate a new one., proceed with the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":58,"menu_order":-1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-143","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":1,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/143\/revisions"}],"predecessor-version":[{"id":144,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/143\/revisions\/144"}],"up":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/pages\/58"}],"wp:attachment":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/media?parent=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}