Hey I need some help with a script that I want to make.
I want it to check in /var/log/auth.log for failed login attempts and print it out like this it the log look like this:
Feb 11 08:06:38 k1piee sshd[19936]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns2.desconisp.com user=root
Feb 11 08:06:40 k1piee sshd[19936]: Failed password for root from 202.90.96.60 port 34162 ssh2
Feb 11 08:06:41 k1piee sshd[19938]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns2.desconisp.com user=root
Feb 11 08:06:43 k1piee sshd[19938]: Failed password for root from 202.90.96.60 port 34374 ssh2
Feb 11 08:06:45 k1piee sshd[19940]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns2.desconisp.com user=root
Feb 11 08:06:47 k1piee sshd[19940]: Failed password for root from 202.90.96.60 port 34551 ssh2
Feb 11 08:06:49 k1piee sshd[19942]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns2.desconisp.com user=root
Feb 11 08:06:51 k1piee sshd[19942]: Failed password for root from 202.90.96.60 port 34724 ssh2
Feb 11 08:06:51: Failed login attempt from: 202.90.96.60 with user: root
Feb 11 08:06:51: Failed login attempt from: 202.90.96.60 with user: root
....
....
or something like that. Is there anyone that can help me with that?
It has to be in bash.