Logins · about 3 minutes
Limit SSH Password Tries
What This Means
SSH lets each connection try many passwords before it disconnects.
Why It Matters
Fewer tries per connection slows password guessing down and makes it easier to spot and block.
- 1
See the current limit
sshd -T | grep -i maxauthtries
- 2
Set it to 3
Settings in /etc/ssh/sshd_config.d/ are read first, and the first value SSH reads wins, so a file named 10-… beats the defaults and anything your host added (such as 50-cloud-init.conf).
echo 'MaxAuthTries 3' > /etc/ssh/sshd_config.d/10-frabs-tries.conf
- 3
Check, reload and confirm
sshd -t && systemctl reload ssh && sshd -T | grep -i maxauthtries
Check It’s Fixed
Run the security report again. This check should now pass.