how do find all failed login attempts via ssh?
Answer Posted / vimal kumar k, technomenace.co
Failed ssh logs are either written in /var/log/messages, or
/var/log/secure (configurable in /etc/syslog.conf). I am
assuming that the failed login attempts are recorded in
/var/log/secure:
grep ' authentication failure' /var/log/secure | sed -e
's/^\(.*\)\(rhost.*\)$/\2/p' | tr -s " " | cut -f2 -d"=" |
cut -f1 -d" " | sort -n | uniq -c
Will show you the count, and the IP/hostname of machines
that tried to access the system via ssh
| Is This Answer Correct ? | 20 Yes | 3 No |
Post New Answer View All Answers
How to know linux os is 32 bit or 64 bit?
What is the difference between clang and llvm?
What is cmake in linux?
What is know about grep commands?
How do I list all processes in linux?
List the three main parts of an operating system command?
What are runlevels in linux?
What language is clang written in?
What does execute mean in linux?
Explain difference between nfs soft and hard mouniting points?
Explain trap command of linux?
Which command will show you free/used memory? Does free memory exist on linux?
What does comm do and how to use it?
How do you ask politely?
What does mkdir mean?