0

I manage a dedicated server and a VPS. The run on CentOS and I access them through SSH and DirectAdmin. These servers have a low tolerance for wrong password and I frequently block my IP out and need to contact the web hosting company to sort things out.

My questions:

Is there anyway that I can increase the number of times that I enter the password incorrectly. At the moment it is only twice. With my habits I need at least 10 times.

user7432810
  • 103
  • 2

1 Answers1

1

This (temporary) block is most likely applied with Fail2ban (see manual).

You can find the correct Fail2ban Jail for SSH from /etc/fail2ban/jail.conf and increase the amount of retries (maxretry), e.g.

[ssh-iptables]
enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
logpath  = /var/log/auth.log
maxretry = 10

Another useful jail option is bantime, ban duration in seconds. It defaults to 600. While I think this is a reasonable penalty for any admin who can mistype password over 10 times, you may disagree. :)

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129