To find the configuration settings for ssh you will need to edit the following file

vi /etc/fail2ban/jail.local
Once you are in the file you will need to locate the ssh-iptables section. It should look similar to the following:
[ssh-iptables]

enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
           sendmail-whois[name=SSH, dest=root, [email protected]]
logpath  = /var/log/secure
maxretry = 5
If you wish to change the default ssh port on your server then you can also change fail2ban to listen to the custom port. Simply replace port=ssh with the ssh port number eg.
port=123

Enabled - represents if the ssh protection is on or off
filter - represents directory in which the configuration file can be found. E.g /etc/fail2ban/filter.d/sshd.conf