adduser YOUR-USER nano /etc/ssh/sshd_config FILE-REPLACE: # Authentication: LoginGraceTime 30 PermitRootLogin no StrictModes yes AllowUsers YOUR-USER FILE-END! /etc/init.d/ssh restart apt-get install fail2ban nano /etc/fail2ban/jail.conf FILE-REPLACE: # "bantime" is the number of seconds that a host is banned. bantime = 3600 # A host is banned if it has generated "maxretry" during the last "findtime" # seconds. findtime = 86400 FILE-END! FILE-REPLACE: [ssh] enabled = true port = ssh filter = sshd logpath = /var/log/auth.log bantime = 3600 maxretry = 3 FILE-END! OR FILE-REPLACE: [sshd] enabled = true port = ssh filter = sshd logpath = /var/log/auth.log bantime = 3600 maxretry = 3 FILE-END! AND FILE-REPLACE: [proftpd] enabled = true port = ftp,ftp-data,ftps,ftps-data logpath = /var/log/proftpd/proftpd.log bantime = 3600 maxretry = 3 FILE-END! systemctl restart fail2ban OR update-rc.d fail2ban enable service fail2ban restart after login: su YOURPASSWORD cd ~