...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