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
can any one send me one project on linux ...?
How is grep so fast?
How many cmd commands are there?
Is llvm a virtual machine?
How use linux command line?
What is the difference between command ‘ping’ and ‘ping6’?
What is the difference between find and locate command in linux?
Which command is used to compare the files?
Explain about system and user utilities?
What command is used to check the number of files, disk space, and each user’s defined quota?
What is whois command in linux?
You issue the command head * what would the resulting output be?
What does uname do in linux?
How do I navigate in cmd?
What is whois command?