From sshd 'Failed password ... from <ip>' lines, print 'ip count' sorted by count desc, then ip asc.
Classic blue-team triage. Each input line looks like:
`Failed password for <user> from <ip> port <n>`
Tally how many failures each IP produced, then print one line per IP as `ip count`, sorted by count descending, breaking ties by IP ascending (lexicographic is fine).
Sign in to save your code and track progress across devices.