This commit is contained in:
2026-01-02 03:03:43 -05:00
parent 7ced83bf6c
commit c1da88d603

View File

@@ -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
```