SSH password authentication enabled
When sshd accepts passwords, every server with SSH open is a target for automated brute-force and password-spray attacks around the clock.
Why it matters
Public SSH endpoints see thousands of login attempts a day. A single weak or reused password is a direct shell on the box.
Key-based authentication removes passwords from the attack surface entirely — there's nothing to guess.
How to check for it
- Run sshd -T | grep -i passwordauthentication — it should say 'passwordauthentication no'.
- Check for 'PasswordAuthentication yes' in /etc/ssh/sshd_config and any file under /etc/ssh/sshd_config.d/.
How to fix it
- Add your public key to the server (ssh-copy-id), confirm key login works, then set PasswordAuthentication no and KbdInteractiveAuthentication no.
- Reload sshd (systemctl reload ssh) and keep an existing session open until you've verified a fresh key login.
- Disable root login too (PermitRootLogin no) and consider SSH only over a VPN.
SkyShield checks this automatically
Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.
FAQ
- What if I lock myself out?
- Always keep one session open and test a new key login before closing it. With console access (your provider's web console) you can recover even if SSH breaks.