Linux & VPS

Fix SSH "Too Many Authentication Failures"

Too many authentication failuresReceived disconnectPermission denied (publickey)
5 min read Updated 12 June 2026 ESAGAMES Team

This error usually isn't a wrong password — it's your SSH client offering too many keys before the right one. The server cuts you off after a few tries. Here's the fix.

Why it happens

If your SSH agent holds several keys, the client tries each one in turn. The server limits authentication attempts (often 5-6), so it disconnects before reaching the correct key — even though you have it.

Fix: offer only the right key

Tell SSH to use one specific key and not try the others:

ssh -o IdentitiesOnly=yes -i ~/.ssh/the_right_key user@server

Make it permanent

Add a host entry in ~/.ssh/config so it always uses the correct key:

Host myserver
  HostName server-ip
  User myuser
  IdentityFile ~/.ssh/the_right_key
  IdentitiesOnly yes
Locked out anyway?

If you genuinely have the wrong/no key, use your provider's VNC/serial console to add your public key to ~/.ssh/authorized_keys — see our guide on SSH connection issues.

Too many keys offered, not a wrong password. Use IdentitiesOnly=yes with the right key, and set it in ~/.ssh/config.

A VDS with console access

Our VDS plans include VNC console access, so a key mix-up never locks you out — protected NVMe in Frankfurt.

See VDS plans
FAQ

Frequently asked questions

What causes "Too many authentication failures" in SSH?

Your SSH client is offering multiple keys from your agent, and the server hits its attempt limit before reaching the correct one. It disconnects even though you have a valid key.

How do I fix it?

Force SSH to use only the right key with -o IdentitiesOnly=yes -i ~/.ssh/yourkey, and add a Host entry in ~/.ssh/config with IdentityFile and IdentitiesOnly yes so it's permanent.

Is this the same as a wrong password?

No. It's usually about too many keys being tried, not a bad password. The fix is to limit which key SSH offers, not to change your password.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney