{"id":8,"date":"2005-09-14T16:24:41","date_gmt":"2005-09-14T16:24:41","guid":{"rendered":"https:\/\/kari.world.ikari.fi\/2005\/09\/14\/ssh-without-password\/"},"modified":"2022-05-19T14:18:48","modified_gmt":"2022-05-19T11:18:48","slug":"ssh-without-password","status":"publish","type":"post","link":"https:\/\/kari.world.ikari.fi\/?p=8","title":{"rendered":"SSH without password"},"content":{"rendered":"<p>How to setup SSH to not ask password always: <a href=\"http:\/\/lists.debian.org\/debian-user\/2005\/05\/msg00273.html\">SSH<\/a><\/p>\n<p>Incoming from STEPHANE DURIEUX:<\/p>\n<p>Well everything is in the title. would like to use ssh in scripts so without entering the password.<\/p>\n<p>local:<\/p>\n<pre class=\"lang:bash decode:true \">ssh-keygen -t rsa -b4096 -f ~\/.ssh\/id_rsa_to_xx<br \/>ssh-keygen -o -a 100 -t ed25519 -f <span class=\"pl-k\">~<\/span>\/.ssh\/id_ed25519_to_xx\n<\/pre>\n<p>When it asks for your passphrase, hit ENTER.<br \/>Now (assuming &#8221;xx:~\/.ssh\/&#8221; exists):<\/p>\n<p>xx:<\/p>\n<pre class=\"lang:bash decode:true \">mkdir ~\/.ssh\n<\/pre>\n<p>local:<\/p>\n<pre class=\"lang:bash decode:true \">scp ~\/.ssh\/id_rsa_to_xx.pub xx:~\/.ssh\n<\/pre>\n<p>Add identity to be used for xx host<\/p>\n<p>local:<\/p>\n<pre class=\"lang:bash decode:true \">vim ~\/.ssh\/config\n<\/pre>\n<p>~\/.ssh\/config:<\/p>\n<pre class=\"lang:bash decode:true \">Host xx\n  IdentityFile ~\/.ssh\/id_rsa_to_xx\n  User yy\n<\/pre>\n<p>xx:<\/p>\n<pre class=\"lang:bash decode:true \">cat ~\/.ssh\/id_rsa_to_xx.pub &gt;&gt; ~\/.ssh\/authorized_keys\nchmod 700 ~\/.ssh\nchmod 600 ~\/.ssh\/authorized_keys\n<\/pre>\n<p>Now, anyone who gets into either box can compromise all of your<br \/>accounts on local and remote with ease. Have fun.<\/p>\n\n\n<p><\/p>\n\n\n\n<p>*UPDATE*<\/p>\n\n\n\n<p><a href=\"https:\/\/medium.com\/risan\/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54\">https:\/\/medium.com\/risan\/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54<\/a><\/p>\n\n\n\n<p>Might be better to soon upgrade into <strong>ed25519<\/strong> now, since likely it should be widely enough supported by now, and fallback to <strong>rsa<\/strong> in case it&#8217;s not supported.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to setup SSH to not ask password always: SSH Incoming from STEPHANE DURIEUX: Well everything is in the title. would like to use ssh in scripts so without entering the password. local: ssh-keygen -t rsa -b4096 -f ~\/.ssh\/id_rsa_to_xxssh-keygen -o -a 100 -t ed25519 -f ~\/.ssh\/id_ed25519_to_xx When it asks for your passphrase, hit ENTER.Now (assuming&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-reference"],"_links":{"self":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8"}],"version-history":[{"count":2,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":755,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions\/755"}],"wp:attachment":[{"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kari.world.ikari.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}