-
-
Save michelep/6c7ec07796309e3bb8f6d6a08d60ddeb to your computer and use it in GitHub Desktop.
TOTP authentication for SSH on Debian/Ubuntu servers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update && sudo apt install --assume-yes libpam-google-authenticator | |
sudo vi /etc/ssh/sshd_config: | |
ChallengeResponseAuthentication yes | |
sudo systemctl restart ssh | |
sudo vi /etc/pam.d/sshd: | |
auth required pam_unix.so no_warn try_first_pass | |
auth required pam_google_authenticator.so | |
google-authenticator |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment