Ansible disabled SSH passwords, but sshd read another file first
A penetration test flagged 23 Linux servers still accepting SSH password logins despite an Ansible playbook setting PasswordAuthentication no. A cloud-init drop-in, 50-cloud-init.conf, was read before the main sshd_config and overrode the setting.
- Pentest found 23 servers still accepting SSH password logins
- cloud-init drop-in 50-cloud-init.conf overrode the sshd_config setting
- sshd -T reported passwordauthentication yes despite no in the file
- Fix: 00-hardening.conf drop-in plus sshd -T check after restart
Read next
Security