-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2FA/MFA for SSH does not work as described #74
Comments
Humm. What distribution are you on? I do not recall having this issue. |
In my case the 2FA doesn't work. SSH just skips that part entirely. Basically, I type in Distro: Ubuntu 22.04 (Desktop version, inside VM) |
Same. The configurations allow me to connect without 2FA. |
As stated in the guide, the steps don't set up MFA to work with public key authentication. However, the guide states that in the 'documentation' it should be specified, this is not the case: My opinion is that, since we're setting up SSH to only use public key authentication, this setup should a) be provided as alternative steps, or b) not provided. |
Steps For Public Key + TOTP MFAModify PAM's SSH configuration file to enable MFAAdd the following line to
This line states that MFA is required for SSH login, Comment out the following lines in
Modify sshd_config to enable MFAAdd the following line to
Restart the SSH servicesudo systemctl restart sshd This configuration will require us to have a private key, |
I followed the instructions step by step and it did not work for me at the beginning.
My solution how it works for me:
In the file /etc/ssh/sshd_config I had to add
AuthenticationMethods publickey,keyboard-interactive
And I removed the
nullok
in the file /etc/pam.d/sshd.But I don't know if this is necessary.
The text was updated successfully, but these errors were encountered: