{"id":6573,"date":"2017-03-27T09:06:39","date_gmt":"2017-03-27T01:06:39","guid":{"rendered":"http:\/\/rmohan.com\/?p=6573"},"modified":"2017-03-27T09:06:39","modified_gmt":"2017-03-27T01:06:39","slug":"disable-password-authentication-for-ssh","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6573","title":{"rendered":"Disable Password Authentication for SSH"},"content":{"rendered":"<h1 class=\"subject\">How to Disable Password Authentication for SSH<\/h1>\n<div class=\"text\">\n<p>Once you have <a href=\"http:\/\/support.hostgator.com\/articles\/ssh-keys\">SSH Keys configured<\/a>, you can add some extra security to your server by disabling password authentication for SSH. (Note that if you do lose your private key, this will make the server inaccessible and you will need to contact HostGator to have this re-enabled.)<\/p>\n<p>To disable this setting, you can do the following:<\/p>\n<div class=\"shell\">nano \/etc\/ssh\/sshd_config<\/div>\n<p>In this file, set the following settings to the following values. If these settings are already in the file, set them to &#8220;no&#8221; rather than add new lines.<\/p>\n<div class=\"shell\">ChallengeResponseAuthentication no<br \/>\nPasswordAuthentication no<br \/>\nUsePAM no<\/div>\n<p>Once this is done, restart the SSH daemon to apply the settings.<\/p>\n<div class=\"shell\">\/etc\/init.d\/sshd restart<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to Disable Password Authentication for SSH <\/p>\n<p>Once you have SSH Keys configured, you can add some extra security to your server by disabling password authentication for SSH. (Note that if you do lose your private key, this will make the server inaccessible and you will need to contact HostGator to have this re-enabled.)<\/p>\n<p>To [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6573"}],"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=6573"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6573\/revisions"}],"predecessor-version":[{"id":6574,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6573\/revisions\/6574"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}