Ubuntu 22.04 sudo apt update && sudo apt install -y fail2ban sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local sudo sed -i "s/^\[sshd\]/[sshd]\nenabled=true/" /etc/fail2ban/jail.local sudo systemctl enable --now fail2ban