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

Which command is used to review boot messages?

1113


Which command puts a script to sleep untill a signal is recieved?

1082


What is umask 000?

945


How many types of dos commands are there?

1137


Who is unix command?

1033


Why echo is used in linux?

1043


What does curl command do in linux?

1076


What is the use of cp p command?

1098


Explain the ‘ls’ command in linux

1093


What is devops linux?

986


What is the programming language for linux?

1186


What are the basic commands in command prompt?

1135


What is nslookup command?

1037


What the command used for list the contents of your home directory, current directory and all subdirectories?

961


Which is the required command for checking the file system?

1076