MaxAuthTries

The sshd_config setting that limits how many authentication attempts a client may make on one connection before it is disconnected.

In more detail

The OpenSSH default is six, and once half that many attempts have failed, further failures are logged. Lowering it slows guessing on a single connection, but an attacker can simply reconnect, so it works best alongside a tool such as fail2ban. Each key a client offers counts as an attempt, so a low limit can lock out a tool that tries several keys before the right one.

Examples

MaxAuthTries 3
git commit -qam "Lower maxauthtries to 3 (CHG-2291)"

Related terms

Taught in

References

Certification courses