Usually people try to disable ssh login with password only. I'm asking about reverse situation. Does sshd_config allow to disable authentication with keys only?
2 Answers
http://www.manpagez.com/man/5/sshd_config/
PubkeyAuthentication
Specifies whether public key authentication is allowed. The
default is ``yes''. Note that this option applies to protocol
version 2 only.
As of today, one more option you may use AuthenticationMethods
, please refer https://www.freebsd.org/cgi/man.cgi?sshd_config(5)
Please read doc carefully before apply.