I found a command in a CentOS7 tutorial to get a small table of the number of the user that try connect via ssh:
|try
|ip
|user
|
The
The code is the next:
zgrep -hi "Failed password for " /var/log/secure* | sed "s/invalid user //" | tr -s " " | awk '{print $11" "$9}' | sort | uniq -c | sort -rn | head -20
zgrep -hi "Failed password for " /var/log/secure* |
sed "s/invalid user //" |
tr -s " " |
awk '{print $11" "$9}' |
sort |
uniq -c |
sort -rn |
head -20
I want to know how its work?