Last active
March 13, 2018 03:40
-
-
Save jeffgeiger/6239a6074de3a419437ecb5df23c6f72 to your computer and use it in GitHub Desktop.
Revisions
-
jeffgeiger revised this gist
Feb 3, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ # Also note, the repo has moved, so you need to adjust the git path: # https://github.com/google/google-authenticator-libpam sudo yum install epel-release -y sudo yum install qrencode qrencode-devel qrencode-libs sudo yum install google-authenticator-1.03-1.el7.centos.x86_64.rpm google-authenticator #per-user setup -
jeffgeiger created this gist
Feb 3, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ ``` ## Build RPM as per https://github.com/google/google-authenticator-libpam/blob/master/contrib/README.rpm.md # Do this elsewhere, you don't want dev tools on a box you're trying to secure. ;) # Also note, the repo has moved, so you need to adjust the git path: # https://github.com/google/google-authenticator-libpam sudo yum install qrencode qrencode-devel qrencode-libs sudo yum install google-authenticator-1.03-1.el7.centos.x86_64.rpm google-authenticator #per-user setup sudo vim /etc/pam.d/sshd # Add (top item) # --- auth sufficient pam_google_authenticator.so # --- sudo vim /etc/ssh/sshd_config # Modify /etc/ssh/sshd_config (Add/change the following) # --- ChallengeResponseAuthentication yes UsePAM yes AuthenticationMethods publickey,keyboard-interactive PasswordAuthentication no # --- systemctl restart sshd ```