From c1da88d6031e8dbd888ebacebfc5c360b88f3092 Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Fri, 2 Jan 2026 03:03:43 -0500 Subject: [PATCH] 2FA --- freebsd/30_2FA.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/freebsd/30_2FA.md b/freebsd/30_2FA.md index e69de29..6721615 100644 --- a/freebsd/30_2FA.md +++ b/freebsd/30_2FA.md @@ -0,0 +1,19 @@ +# Setting-Up Google Authenticator for SSH 2FA + +Securing remote access to a FreeBSD server is crucial, and enabling two-factor authentication (2FA) for SSH is an excellent way to add an extra layer of security. Google Authenticator is a popular choice for implementing Time-based One-Time Passwords (TOTP) for 2FA. + +## 1. Install Google Authenticator PAM Module + +Google Authenticator requires the pam_google_authenticator module to generate and validate OTPs. Install it using the FreeBSD package manager. + +``` sh +pkg install pam_google_authenticator +``` + +## 2. Configure Google Authenticator for Your User + +Each user who will use 2FA needs to configure Google Authenticator individually. Log in as the user and run: + +```sh +google-authenticator +```