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
Which command is used to review boot messages?
Which command puts a script to sleep untill a signal is recieved?
What is umask 000?
How many types of dos commands are there?
Who is unix command?
Why echo is used in linux?
What does curl command do in linux?
What is the use of cp p command?
Explain the ‘ls’ command in linux
What is devops linux?
What is the programming language for linux?
What are the basic commands in command prompt?
What is nslookup command?
What the command used for list the contents of your home directory, current directory and all subdirectories?
Which is the required command for checking the file system?