Skip to content

Instantly share code, notes, and snippets.

@Ignition
Created April 13, 2011 10:31
Show Gist options
  • Save Ignition/917328 to your computer and use it in GitHub Desktop.
Save Ignition/917328 to your computer and use it in GitHub Desktop.
Blog-p1-i3
#!/bin/sh
zcat -f /var/log/auth.log* | grep 'Failed password' | grep sshd | awk '{print $1,$2}' | sort -k 1,1M -k 2n | uniq -c
## Output
#
# 952 Mar 13
# 1418 Mar 14
# 1781 Mar 15
# 1365 Mar 16
# 4572 Mar 17
# 765 Mar 18
# 725 Mar 19
# 1075 Mar 20
# 505 Mar 21
# 2895 Mar 22
# 368 Mar 24
# 248 Mar 25
# 942 Mar 27
# 192 Mar 28
# 5 Mar 29
# 8 Mar 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment