The server rejected your key. 90% of cases are wrong permissions, wrong key, or the right key on the wrong account.
sshd refuses keys with permissive permissions: ~/.ssh or authorized_keys group/world readable.
ssh is silently offering a different key than you think. -v reveals the offer list.
Right key, wrong account — or the cloud provider's key was never added for this username.
ssh -v user@host 2>&1 | grep -i 'offering'
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_ed25519 ~/.ssh/authorized_keys
ssh -i ~/.ssh/id_ed25519 deploy@host -o IdentitiesOnly=yes
sudo journalctl -u ssh -n 50 # or /var/log/auth.log
sshd logs the real reason server-side ('Authentication refused: bad ownership'). Client-side -v tells you what you offered; server logs tell you why it was refused.
The server rejects at a stage before the key comparison: wrong permissions on the home dir, .ssh (700), or authorized_keys (600), or SELinux contexts. sshd's log (LogLevel DEBUG) names the exact failing check — use ssh -v and compare.
PermitRootLogin defaults to prohibit-password, which accepts keys — but many distros ship it as no. Check sshd_config for the root-specific policy before assuming the key is the problem.
Our most-documented failures, packaged as ready-to-ship starter kits: Docker, Kubernetes, and Terraform.
Browse the template store →One-time. Yours to modify. Instant download from the NinjaOps template store.