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 nbtstat command?
How do you create a text file in linux?
What are the mv command options?
In order to display the last five commands you have entered using the fc command, you would type?
Explain about system and user utilities?
How do I run multiple commands in linux?
How do you run command every time a file is modified?
How do you do nslookup?
What does umask 022 mean?
You need to see the last fifteen lines of the files dog, cat and horse. What command should you use?
How do you run a command for a limited time?
What is the root directory linux?
What is cpu core in linux?
What is shell scripting commands?
What is makefile in unix?