Page 1 of 1

Cannot SSH to account after 3 failed attempts

Posted: Wed Dec 26, 2018 5:43 pm
by bobmeetin
This happens occasionally due to sticky fingers or perhaps rushing when attempting to SSH. After I enter the password incorrectly several times (3?) it locks me out with an error like cannot connect (didn't write down the error). It appears to be specific to the IP address I am signing in from. To fix the problem I have to reboot my router and come up with a different IP address.

How do I fix this so that it's more forgiving?

Re: Cannot SSH to account after 3 failed attempts

Posted: Thu Dec 27, 2018 2:12 am
by cottager
That's fail2ban working properly. It's a temporary block. Perhaps 10 minutes if memory serves. You can look up it's config right inside vestacp and adjust it if necessary, but I'd not. it's protecting you from people who would crack their way in.

Re: Cannot SSH to account after 3 failed attempts

Posted: Mon Jul 05, 2021 11:17 pm
by bobmeetin
I understand the purpose however I would like to know how to do this. I found the file:

/etc/fail2ban/jail.conf

The ban time appears to be 3600 seconds which is fine. I don't understand the syntax and correct entry where to make a change, for instance to 5 attempts for an http access or perhaps ssh. Or maybe I will wish to make it more restrictive, possibly a permanent ban for ssh.

Re: Cannot SSH to account after 3 failed attempts

Posted: Tue Mar 15, 2022 5:26 am
by clementishutin
That's how fail2ban is supposed to function. It's only a temporary stumbling hurdle. If my memory serves me correctly, it was about ten minutes. You can look up the configuration right inside vestacp and make changes if needed, but I wouldn't. It's guarding you from those who would try to break in via the cracks.