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 finger in networking?
How do I find hostname in linux?
How use linux command line?
What is know about grep commands?
Write a command that will display all .txt files, including its individual permission.
How can we increase disk read performance in single command in Linux?
How do you create a file?
Is python faster than bash?
What the command used for search file or files for specific text?
How do you save a file in linux?
Explain any one service which are working on udp only?
Explain about the command elm?
What is mkdir p linux?
What is whois command in linux?
What Command used to lock user password?