{"id":5086,"date":"2015-08-08T07:06:55","date_gmt":"2015-08-07T23:06:55","guid":{"rendered":"http:\/\/rmohan.com\/?p=5086"},"modified":"2015-08-08T07:23:11","modified_gmt":"2015-08-07T23:23:11","slug":"ssh-password-authentication","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5086","title":{"rendered":"SSH password authentication"},"content":{"rendered":"<p>There are times when you really want to get rid of SSH password authentication, however SSH is VERY picky about permissions etc. I just found out that there&#8217;s a tool for that in all Linux boxes!<\/p>\n<p>As promised, the two simple steps:<\/p>\n<ol>\n<li>Create your keypair (assuming you don&#8217;t already have it ready)<span class=\"Apple-converted-space\">\u00a0<\/span>\n<pre class=\"typo-code\">$ ssh-keygen -t rsa<\/pre>\n<p>Make sure NOT to enter a passphrase, or you&#8217;ll have to enter that every time you use the keypair!<\/li>\n<li>Copy it over to the server and make all necessary adjustments (create directory, fix permissions, etc)<span class=\"Apple-converted-space\">\u00a0<\/span>\n<pre class=\"typo-code\">$ ssh-copy-id -i id_rsa.pub user@example.com<\/pre>\n<p>You&#8217;ll be prompted for your password, and then notified that you can now try logging into the server.<\/li>\n<li>Enjoy!<\/li>\n<\/ol>\n<p>&#8211;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are times when you really want to get rid of SSH password authentication, however SSH is VERY picky about permissions etc. I just found out that there&#8217;s a tool for that in all Linux boxes!<\/p>\n<p>As promised, the two simple steps:<\/p>\n<p> Create your keypair (assuming you don&#8217;t already have it ready) $ ssh-keygen -t [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5086"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5086"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5086\/revisions"}],"predecessor-version":[{"id":5087,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5086\/revisions\/5087"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}