Skip to content

Instantly share code, notes, and snippets.

@skarllot
Created October 31, 2013 11:30
Show Gist options
  • Save skarllot/7248182 to your computer and use it in GitHub Desktop.
Save skarllot/7248182 to your computer and use it in GitHub Desktop.
Two-factor authentication on SSH with Google authenticator
#%PAM-1.0
auth required pam_google_authenticator.so secret=${HOME}/.ssh/google_authenticator
auth required pam_sepermit.so
auth include password-auth
. . .
#/etc/pam.d/sshd
. . .
# Change to no to disable s/key passwords
ChallengeResponseAuthentication yes
#ChallengeResponseAuthentication no
. . .
# /etc/ssh/sshd_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment