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 is the programming language for linux?
Which command is used to delete a group?
What are the options of wc command?
What is grep command in linux with examples?
How do you run a command for a limited time?
How compile c++ program in cmd?
How can I delete a file in linux?
What is ulimit command?
What is the best cpu stress test?
How does grep work in linux?
What is lsof command in linux?
What is ulimit in linux?
What are the command prompt commands?
What is tty in linux process?
What is df command in unix?