[CentOS] Disable SSH password authentication

Created on November 30, 2026

Set the following directive in /etc/ssh/sshd_config on the SSH server to disable password authentication.

PasswordAuthentication no

Before reloading the service, verify that you can connect using another method, such as public-key authentication. If keyboard-interactive authentication is also enabled, check whether your server uses it to accept passwords.

CentOS