Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is nbtstat command?

1120


How do you create a text file in linux?

1187


What are the mv command options?

936


In order to display the last five commands you have entered using the fc command, you would type?

964


Explain about system and user utilities?

1006


How do I run multiple commands in linux?

1104


How do you run command every time a file is modified?

1023


How do you do nslookup?

1067


What does umask 022 mean?

1210


You need to see the last fifteen lines of the files dog, cat and horse. What command should you use?

1028


How do you run a command for a limited time?

1059


What is the root directory linux?

1073


What is cpu core in linux?

1070


What is shell scripting commands?

1257


What is makefile in unix?

1166