Two-factor authentication for SSH
Sep 29, 2019JJ Asghar
Summary
This post details the implementation of two-factor authentication (2FA) for SSH access using `libpam-google-authenticator` on Debian-based systems. It covers installing the authenticator, configuring PAM (`/etc/pam.d/sshd`) and `sshd_config` for public key and keyboard-interactive authentication, and 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, and provides guidance on using automation tools like Chef or Ansible for configuration.