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
What does umask 077 mean?
What is iptables command in linux?
Is cmake a compiler?
You wish to print a file ‘draft’ with 60 lines to a page. What command would you use?
What Command used to lock user password?
Explain command grouping in linux?
Which command is used to compare the files?
How do I check cpu usage?
How to give acl permission in numerical mode on linux?
How many linux commands are there?
What does && mean in bash?
What is the difference between command ‘ping’ and ‘ping6’?
What is tty in linux command?
What are vim commands?
How can I check the exit status of my previous command in Linux operating system?