{"id":1243,"date":"2009-08-13T00:00:00","date_gmt":"2009-08-12T22:00:00","guid":{"rendered":"https:\/\/wwwneu.strehle.de\/tim\/weblog\/archives\/2009\/08\/13\/1181\/"},"modified":"2009-08-13T00:00:00","modified_gmt":"2009-08-12T22:00:00","slug":"1181","status":"publish","type":"post","link":"https:\/\/www.strehle.de\/tim\/weblog\/archives\/2009\/08\/13\/1181\/","title":{"rendered":"SSH login without password"},"content":{"rendered":"<p>I keep forgetting this line\u2026<\/p>\n<pre><code>$ cat ~\/.ssh\/id_dsa.pub | ssh user@host 'cat &gt;&gt; .ssh\/authorized_keys'\n<\/code><\/pre>\n<p>Update \u2013 you might instead want to try:<\/p>\n<pre><code>$ cat ~\/.ssh\/id_rsa.pub | ssh user@host 'cat &gt;&gt; .ssh\/authorized_keys'\n<\/code><\/pre>\n<p>If it still doesn\u2019t work, check the file permissions: <code>0700<\/code> on the <code>.ssh<\/code> directory and <code>0644<\/code> on the <code>authorized_keys<\/code> file are working for me, <code>0664<\/code> on <code>authorized_keys<\/code> isn\u2019t.<\/p>\n<p>Thanks to Mathias Kettner \u2013 <a href=\"http:\/\/linuxproblem.org\/art_9.html\">SSH login without password<\/a>.<\/p>\n<p><em>Update (2021-01-17):<\/em> Easier, and just works (which the former method doesn\u2019t anymore on my latest server):<\/p>\n<pre><code>$ ssh-copy-id user@host\n<\/code><\/pre>\n<p><em>Update:<\/em> See Gert van Dijk \u2013 <a href=\"https:\/\/blog.g3rt.nl\/upgrade-your-ssh-keys.html\">Upgrade your SSH keys!<\/a><\/p>\n<p><em>Update (2017-06-19):<\/em> For a while, it seemed one should use <code>.ssh\/authorized_keys2<\/code> instead. Someday I\u2019ll take the time to actually learn about this\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I keep forgetting this line\u2026 $ cat ~\/.ssh\/id_dsa.pub | ssh user@host &#8218;cat &gt;&gt; .ssh\/authorized_keys&#8216; Update \u2013 you might instead want to try: $ cat ~\/.ssh\/id_rsa.pub | ssh user@host &#8218;cat &gt;&gt; .ssh\/authorized_keys&#8216; If it still doesn\u2019t work, check the file permissions: 0700 on the .ssh directory and 0644 on the authorized_keys file are working for me, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_share_on_mastodon":"0"},"categories":[1],"tags":[],"class_list":["post-1243","post","type-post","status-publish","format-standard","hentry","category-weblog"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts\/1243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/comments?post=1243"}],"version-history":[{"count":0,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/posts\/1243\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/media?parent=1243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/categories?post=1243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.strehle.de\/tim\/wp-json\/wp\/v2\/tags?post=1243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}