I have the need of having users logging in to a CentOS system with different authentication methods. Some using password and others using public key.
I followed the methods mentioned here: How can I setup OpenSSH per-user authentication methods?
However, I am not successful in having successful password based login.
In the sshd_config file, I have:
AuthenticationMethods keyboard-interactive,publickey
PasswordAuthentication no
Match User newton
PasswordAuthentication yes
Match all
Update: I see that the issue is only when I have 2FA enabled with google authentication and I have the line:
AuthenticationMethods keyboard-interactive,publickey
Though for the user newton, I have set password authentication I see the following error:
[root@localhost]# ssh [email protected]
Permission denied (publickey).
Any suggestions are appreciated.