Interview Prep/Linux/Rapid-Fire Commands

Show failed SSH login attempts by source IP.

IntermediateProductionRapid-Fire Commands
Answer
sudo journalctl -u ssh -u sshd --since today | grep 'Failed password' \
  | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head
sudo lastb | head        # from /var/log/btmp
All Linux questions Roadmap: Linux

More on Rapid-Fire Commands