An unhandled error has occurred.
Reload
X
UIZFORGE
Exams
Pricing
Career Paths
Resources
EN
Login
Sign Up
1
/ 5
Intermediate
A Quantum Retail security analyst is reviewing last night's auth.log and wants to produce a quick on-screen report of the top 5 source IPs with failed logins. Which one-liner will achieve this with standard tools?
cat /var/log/auth.log | grep Failed | cut -d' ' -f10 | sort | uniq -c | sort -rn | head -5
grep 'Failed password' /var/log/auth.log | awk '{for(i=1;i<=NF;i++) if($i=="from") print $(i+1)}' | sort | uniq -c | sort -rn | head -5
journalctl -u ssh | grep 'Failed' | wc -l
lastb | awk '{print $3}' | sort | uniq -c | sort -rn | head -5
AI Tutor
Stuck? Get a hint