/etc/ssh/sshd_config I uncomment option
PasswordAuthentication no and restart the service via
service sshd reload. But password authentication is still available. Why?
The debug log (run
-vvv arguments) would give you more clue about what is going on in the connection.
password authentication is not the only one which can prompt you for some kind of password. There is always
keyboard-interactive, which behaves very similarly and is usually used by PAM. It is controlled by the
ChallengeResponseAuthentication option, which defaults to
yes. If you want to disable it, you need to put this option with
no into the configuration explicitly.
Also do not disable PAM (
UsePAM). It is not used only for authentication, but also for setting up session of the user and other steps around authentication. It might work for you now, but it might break in future or for somebody else who will be using different system.