curl -fsSL helper.sh/centos_disable_password_ssh.sh | sudo bash curl -fsSL -o centos_disable_password_ssh.sh helper.sh/centos_disable_password_ssh.sh && sudo bash centos_disable_password_ssh.sh Security hardening
Built for CentOS and similar OpenSSH hosts that should move from password-based login to key-only access. The script refuses to proceed unless a usable authorized_keys file exists for the target user, then updates sshd_config with idempotent edits and validates the result before reloading the daemon.
A practical guide to using centos_disable_password_ssh.sh only after key-based access is confirmed, so you can turn off password login on CentOS safely and predictably.
Keep legacy CentOS 7 hosts installable and maintainable when yum repositories fail, mirrors expire, or Docker data needs to be moved off a crowded disk.
トピックを見るThe usual cause is disabling PasswordAuthentication before confirming that the target account already has a working authorized_keys file and a successful key-based login test.
ページを見る