BlogsIBMSSH Two-Factor Authentication

SSH Two-Factor Authentication

SSH Two-Factor Authentication

1
posts
2019

This post details the implementation of two-factor authentication (2FA) for SSH access using libpam-google-authenticator on Debian-based systems. It covers the installation of the authenticator, configuration of PAM and sshd_config for public key and keyboard-interactive authentication, and provides guidance on automating the setup with command-line options. The post emphasizes the security benefits of adding an extra layer of authentication beyond passwords and public keys.

2019

Two-factor authentication for SSH

9/29/2019

This post introduces and details the technical steps for implementing two-factor authentication for SSH using `libpam-google-authenticator`. It covers package installation, user-level configuration of the authenticator (including time-based tokens, scratch codes, and rate-limiting), modification of `/etc/pam.d/sshd` to include `pam_google_authenticator.so`, and updates to `/etc/ssh/sshd_config` to enable `ChallengeResponseAuthentication` and specify `AuthenticationMethods publickey,keyboard-interactive`. It also provides command-line options for automating the authenticator setup.