Is PermitRootLogin=prohibit-password still necessary when PasswordAuthentication=no?
Solution 1:
prohibit-password
means authenticate with any allowed mechanism that is not password and not keyboardinteractive. See sshd_config PermitRootLogin
PasswordAuthentication no
just means authenticate with any allowed mechanism that is not password, obviously. See sshd_config PasswordAuthentication
Therefore, the answer is no.
Also, prohibit-password
is specific to the root account, PasswordAuthentication no
is a global setting that affects all the accounts.
Note however, if you don't use keyboardinteractive, then the answer is yes (only considering the root account)