#!/bin/bash

function test()
{
	exist=`systemctl |grep running|grep service|grep ssh`
	if [[ -n "$exist" ]];then
		ret=`grep "PermitRootLogin" /etc/ssh/sshd_config | grep yes|grep -v "#"`
        #echo $ret
		#$ret is not null
		if [[ -n "$ret" ]];then
			echo 1
		else
			echo 0
		fi
	else
			echo 0
	fi 
        

}
test





