Duo_unix: SSH First Factor Password OR Pubkey

Is there a way to setup /etc/pam.d/sshd and /etc/ssh/sshd_config for publickey OR password? In other words, If a user prefers password first factor versus publickey first factor. I’d like the option of both.


I installed package “pam_2fa” and used the module “pam_ssh_user_auth.so” in /etc.pam.d/sshd

ExposeAuthenticationMethods pam-only

Thanks for sharing your solution!

1 Like