Why PasswordAuthentication no does nothing on Ubuntu 24.04
sshd uses the FIRST value it finds, not the last — and 50-cloud-init.conf sets PasswordAuthentication yes before your file is ever read. How to check what is actually in effect, and how to fix it properly.