google-authenticator-libpam

PAM module for two-factor authentication

https://github.com/google/google-authenticator-libpam

/api/formula-linux/google-authenticator-libpam.json (JSON API)

Linux formula code on GitHub

Current versions:

stable 1.06
bottle 🍾 catalina, mojave, high_sierra, sierra

Depends on:

qrencode 4.0.2 QR Code generation

Depends on when building from source:

autoconf 2.69 Automatic configure script builder
automake 1.16.1 Tool for generating GNU Standards-compliant Makefiles
libtool 2.4.6 Generic library support script
Add 2-factor authentication for ssh:
    echo "auth required $(brew --prefix)/opt/google-authenticator-libpam/lib/security/pam_google_authenticator.so" \
    | sudo tee -a /etc/pam.d/sshd

Add 2-factor authentication for ssh allowing users to log in without OTP:
    echo "auth required $(brew --prefix)/opt/google-authenticator-libpam/lib/security/pam_google_authenticator.so" \
    "nullok" | sudo tee -a /etc/pam.d/sshd

(Or just manually edit /etc/pam.d/sshd)
Fork me on GitHub