Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| setup_2fa_with_google_authenticator_for_ssh [16.12.2022 09:43] – Pascal Suter | setup_2fa_with_google_authenticator_for_ssh [09.12.2025 16:47] (current) – [ssh key authentication] Pascal Suter | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| apt install libpam-google-authenticator | apt install libpam-google-authenticator | ||
| echo "auth required pam_google_authenticator.so" | echo "auth required pam_google_authenticator.so" | ||
| - | sed -i ' | + | echo " |
| </ | </ | ||
| now run this for each user to create the google authenticator key for each user: | now run this for each user to create the google authenticator key for each user: | ||
| Line 26: | Line 26: | ||
| make sure these options are sett as follows in your ''/ | make sure these options are sett as follows in your ''/ | ||
| < | < | ||
| - | ChallengeResponseAuthentication | + | KbdInteractiveAuthentication |
| UsePAM yes | UsePAM yes | ||
| AuthenticationMethods publickey, | AuthenticationMethods publickey, | ||