<< Server to VM | Home | Docker Bash >>

Unban a client-ip in sshd after failing passwords

...if you have still somehow access to the server

What happend?
Today I was working on my synced test-server.
In order to check the apache2 is working properly I set the domain to test in my /etc/hosts file. Good thing first. Everything is working fine, just as if I would work on the production server.

But when you want to login to the production-server and you use the overridden url you end up again on the test-system (where I changed the password for safety reasons). To make the long story short. I ended up failing the password three times and when I realized that I was trying to access the test-server it was too late. The test-server banned me. At least for some time.

Good that I have the VM 'physically' here and can work directly on the test-server. So here is the magic how to tell fail2ban so unban a certain IP:

# check for the right jail name. (I guess this will be everytime sshd)
sudo fail2ban-client status
# unban
sudo fail2ban-client set <JAIL> unbanip <THE_IP_TO_UNBAN>
# e.g.  sudo fail2ban-client set sshd unbanip

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!