{"id":12,"date":"2020-03-25T23:55:32","date_gmt":"2020-03-25T23:55:32","guid":{"rendered":"https:\/\/blog.thomarite.uk\/?p=12"},"modified":"2020-06-24T15:15:03","modified_gmt":"2020-06-24T14:15:03","slug":"ssh-keys","status":"publish","type":"post","link":"https:\/\/blog.thomarite.uk\/index.php\/2020\/03\/25\/ssh-keys\/","title":{"rendered":"SSH Keys"},"content":{"rendered":"\n<p>I already use RSA ssh keys to access my VPS but a friend of mine send me a link about ED25519 public-key algorithm. But why ssh-keys? Mainly to avoid to type your password every single time.<\/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>I will not explain the maths behind because I can&#8217;t (but I would love to understand) so wikipedia can do a better work (and in the main time, think of donating a few bucks \ud83d\ude42<\/p>\n\n\n\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/EdDSA\">https:\/\/en.wikipedia.org\/wiki\/EdDSA<\/a><\/p>\n\n\n\n<p>If you still want to generate RSA keys (you can have both), this is my go-to link:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.cyberciti.biz\/faq\/how-to-set-up-ssh-keys-on-linux-unix\/\">https:\/\/www.cyberciti.biz\/faq\/how-to-set-up-ssh-keys-on-linux-unix\/<\/a><\/p>\n\n\n\n<p>Summary, just in case the links disappear:<\/p>\n\n\n\n<p># create your key RSA or Ed25519<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ssh-keygen -t rsa -f ~\/.ssh\/id_rsa4096 -b 4096 -C \"user@origin\"<\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ssh-keygen -o -a 100 -t ed25519 -f ~\/.ssh\/id_ed25519 -C \"user@origin\"<\/pre>\n\n\n\n<p># Add your <strong>priv<\/strong> key into your ssh-agent so it is used when connecting to the destination<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ssh-add ~\/.ssh\/id_xxx<\/pre>\n\n\n\n<p># Copy your PUBLIC!!! key to the remote server you want to login with that key (and so you dont need to type a password)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ssh-copy-id -i .ssh<strong>\/<\/strong>id_xxx.<strong>pub<\/strong> user<strong>@<\/strong>remove_server<\/pre>\n\n\n\n<p># Test your new ssh-key<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ ssh -i ~\/.ssh\/id_xxx user@remove_server<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I already use RSA ssh keys to access my VPS but a friend of mine send me a link about ED25519 public-key algorithm. But why ssh-keys? Mainly to avoid to type your password every single time. https:\/\/medium.com\/risan\/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54 I will not explain the maths behind because I can&#8217;t (but I would love to understand) so wikipedia &hellip; <a href=\"https:\/\/blog.thomarite.uk\/index.php\/2020\/03\/25\/ssh-keys\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;SSH Keys&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-unix","category-security"],"_links":{"self":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":2,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":219,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/posts\/12\/revisions\/219"}],"wp:attachment":[{"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.thomarite.uk\/index.php\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}