Interview Prep/Linux/SSH & Access Hardening

How do you enforce MFA for SSH?

AdvancedProductionSSH & Access Hardening
Answer

Options: FIDO2 hardware-backed keys (ssh-keygen -t ed25519-sk), where the key requires a physical touch; or PAM with TOTP (pam_google_authenticator) combined with keys:

AuthenticationMethods publickey,keyboard-interactive
KbdInteractiveAuthentication yes
UsePAM yes

and auth required pam_google_authenticator.so in /etc/pam.d/sshd. At scale we prefer an access proxy (Teleport, SSM, Boundary) that does SSO + MFA centrally and issues short-lived certs.

All Linux questions Roadmap: Linux

More on SSH & Access Hardening