SSH MFA - samuel-richardson/Sam-Tech-Journal GitHub Wiki

SSH MFA

Google Auth setup

sudo dnf install google-authenticator
google-authenticator
    y
    y
    n
    y
cp ~/.google-authenticator ~/.ssh/

/etc/ssh/sshd_config

KbdInteractiveAuthentication yes
AuthenticationMethods publickey,keyboard-interactive
  • Restart sshd

etc/pam.d/sshd

auth   required        pam_google_authenticator.so nullok secret=/home/${USER}/.ssh/.google_authenticator