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
Why makefile is used in linux?
What is grep command?
How do you create a file in linux?
What is difference between comm and CMP command?
How to recover /etc/passwd file and /etc/shadow file?
What is s in permission linux?
What Command used to lock user password?
How do I run bash on windows?
What is 9 in kill?
What is history command in linux?
What is the use of cp p command?
What are grep commands?
What is the pwd command?
What command do you type to find help about the command who?
What is clang tidy?