root@ubuntu:~# ssh root@59.111.95.153 root@59.111.95.153's password: Last failed login: Thu Dec 2815:39:11 CST 2017 from 59.111.94.46on ssh:notty There were 4 failed login attempts since the last successful login. Last login: Thu Dec 2815:30:282017 from 59.111.94.46 [root@cetnos ~]#
[root@cetnos ~]# useradd test [root@cetnos ~]# passwd test Changing password for user test. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@cetnos ~]# su test [test@cetnos root]$ cd ~ [test@cetnos ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/test/.ssh/id_rsa): Created directory '/home/test/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/test/.ssh/id_rsa. Your public key has been saved in /home/test/.ssh/id_rsa.pub. The key fingerprint is: SHA256:nbcN9rAJflXZkbQrf82wzGzvLaECrg3pCfzhbnuL6Nc test@cetnos.novalocal The key's randomart image is: +---[RSA 2048]----+ | .o.| | .=| | oo| | . . ..| | S + =.o. | | . ... + &++.| | o +o .. =.Oo+| | *o*E ......o| | .o+X+o. . o+| +----[SHA256]-----+
root@ubuntu1:~# tail -f /var/log/fail2ban.log 2017-12-2817:19:09,115 fail2ban.jail [2490]: INFO Jail 'sshd' started 2017-12-2817:19:09,122 fail2ban.jail [2490]: INFO Jail 'ssh-iptables' started 2017-12-2817:22:07,855 fail2ban.filter [2490]: INFO [sshd] Found 59.111.94.46 2017-12-2817:22:09,675 fail2ban.filter [2490]: INFO [sshd] Found 59.111.94.46 2017-12-2817:22:18,676 fail2ban.filter [2490]: INFO [sshd] Found 59.111.94.46 2017-12-2817:22:19,434 fail2ban.actions [2490]: NOTICE [sshd] Ban 59.111.94.46