CHips L MINI SHELL

CHips L pro

Current Path : /opt/zabbix_scripts/
Upload File :
Current File : //opt/zabbix_scripts/check_ssh_rpm

#!/bin/bash
#################################################################
#                                                               #
#Plugin name:check_ssh_rpm					#
#Description:Plugin to check if the SSH RPMs are modified	#
#Author:PJF                                                     #
#                                                               #
#################################################################

list=$(rpm --verify openssh openssh-server openssh-clients | grep -ve " c " -e ".M......." )

if [ $? -eq 0 ]; then
	line=$(echo -e "$list" | awk '{print $2}' | tr "\n" " ")
	echo -e "CRITICAL: Modified binaries: $line "
	exit 2
fi

echo -e "OK: No modified binaries found"

Copyright 2K16 - 2K18 Indonesian Hacker Rulez