Okay, Ive done this sometimes where I typed in my password hastily and ended entering it incorrectly mutiple times which results to my IP being ban by fail2ban. To unban your IP you need to either wait for the ban time you set to expire or if you cant you will need to access your server using a different IP address.
Once you have gained access to your server type this in:
iptables -L -n
Search for the line where you IP is. It should be below the line of:
Chain fail2ban-ssh (1 references)
If its there then your IP is still banned from using SSH. To remove it type:
iptables -D fail2ban-SSH -s [your-ip] -j DROP
Change “[your-ip]” to your actual IP. Now check again the iptables and the entry for your IP is should now be gone and this means that you are now unban from fail2ban-ssh.
Recent Comments