Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1223  / 2 Years ago, thu, march 10, 2022, 9:47:22

I've followed several different guides on how to configure two factor authentication on my ssh server using the google's libpam-google-authenticator. I've been able to get it to work but when I try and log in from my desktop or any other device over the ssh I have to give it my ssh-key, user password, and then the authenticator token. But in my sshd_config file I have:



AuthenticationMethods publickey,keyboard-interactive  
ChallengeResponseAuthentication yes
PasswordAuthentication no
UsePAM yes


And in my /etc/pam.d/sshd I added



auth required pam_google_authenticator.so


So I think it should not ask for password as well. How can I fix it?


More From » server

 Answers
7

Comment out the line @include common-auth from your /etc/pam.d/sshd. It will ask only for the second factor (if configured!).


[#13349] Thursday, March 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oraoming

Total Points: 354
Total Questions: 105
Total Answers: 124

Location: Iraq
Member since Sat, Apr 3, 2021
3 Years ago
;