{"id":2430,"date":"2013-07-25T11:52:49","date_gmt":"2013-07-25T03:52:49","guid":{"rendered":"http:\/\/rmohan.com\/?p=2430"},"modified":"2013-07-25T11:52:49","modified_gmt":"2013-07-25T03:52:49","slug":"google-authenticator-in-centos","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2430","title":{"rendered":"Google-authenticator in CentOS"},"content":{"rendered":"<p>yum install gcc gcc++ make python python-devel git pam-devel<\/p>\n<p>cd \/tmp<br \/>\ngit clone https:\/\/code.google.com\/p\/google-authenticator\/<br \/>\ncd google-authenticator\/libpam<br \/>\nmake<br \/>\nmake install<br \/>\ncd \/tmp<br \/>\nrm -Rf google-authenticator\/<\/p>\n<p>&nbsp;<br \/>\nTo enable ssh 2 factor:<\/p>\n<div>sed -i &#8216;1 a\\ auth required pam_google_authenticator.so&#8217; \/etc\/pam.d\/sshd<\/div>\n<div><\/div>\n<div><\/div>\n<div>Make sure that challenge response is listed as YES in your SSHD config<\/p>\n<div>&#8230;<br \/>\nChallengeResponseAuthentication yes<\/div>\n<p>Login as the user you want to protect and run:<\/p>\n<div>google-authenticator<\/div>\n<div><\/div>\n<div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>yum install gcc gcc++ make python python-devel git pam-devel<\/p>\n<p>cd \/tmp git clone https:\/\/code.google.com\/p\/google-authenticator\/ cd google-authenticator\/libpam make make install cd \/tmp rm -Rf google-authenticator\/<\/p>\n<p>&nbsp; To enable ssh 2 factor:<\/p>\n<p> sed -i &#8216;1 a\\ auth required pam_google_authenticator.so&#8217; \/etc\/pam.d\/sshd Make sure that challenge response is listed as YES in your SSHD config<\/p>\n<p> &#8230; ChallengeResponseAuthentication yes <\/p>\n<p>Login [&#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\/2430"}],"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=2430"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2430\/revisions"}],"predecessor-version":[{"id":2432,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2430\/revisions\/2432"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}