CocoaEngineering
FORMULAv1.11

google-authenticator-libpam for macOS

PAM module for two-factor authentication

Installation on macOS (Apple Silicon & Intel)

brew install google-authenticator-libpam

Package Metadata

Identifiergoogle-authenticator-libpam
Current Version1.11
Tap Repositoryhomebrew/core
LicenseApache-2.0
Upstream Homepagehttps://github.com/google/google-authenticator-libpam
Last Verified2026-11-26T14:43:31Z

Runtime Dependencies (1)

qrencode

Build Dependencies (3)

autoconf automake libtool

Engineering Caveats

Add 2-factor authentication for ssh:
  echo "auth required $HOMEBREW_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 $HOMEBREW_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)
Browse macOS Packages A–Z