Update and install Fail2Ban by typing the following commands:
$> sudo apt-get update
$> sudo apt-get install fail2ban
Edit SSH Fail2Ban configurations. Open up the "/etc/fail2ban/jail.local" file with the following command (jail.local file should be empty):
$> sudo nano /etc/fail2ban/jail.local