diff --git a/ansible/security_check/roles/security_check/files/rocky.sh b/ansible/security_check/roles/security_check/files/rocky.sh index 2b3d930..d2c4f0c 100644 --- a/ansible/security_check/roles/security_check/files/rocky.sh +++ b/ansible/security_check/roles/security_check/files/rocky.sh @@ -75,9 +75,9 @@ U_01() { fi fi # sshd_config 파일의 존재 여부를 검색하고, 존재한다면 ssh 서비스가 실행 중일 때 점검할 별도의 배열에 저장함 - sshd_config_count=`find / -name 'sshd_config' -type f 2> /dev/null | wc -l` + sshd_config_count=`find /etc/ssh -name 'sshd_config' -type f 2> /dev/null | wc -l` if [ $sshd_config_count -gt 0 ]; then - sshd_config_file=(`find / -name 'sshd_config' -type f 2> /dev/null`) + sshd_config_file=(`find /etc/ssh -name 'sshd_config' -type f 2> /dev/null`) fi # /etc/services 파일 내 ssh 서비스의 포트 번호가 설정되어 있는지 확인하고, 설정되어 있다면 실행 중인지 확인함 if [ -f /etc/services ]; then diff --git a/ansible/security_check/roles/security_check/files/ubuntu.sh b/ansible/security_check/roles/security_check/files/ubuntu.sh index 0002730..335ac2f 100644 --- a/ansible/security_check/roles/security_check/files/ubuntu.sh +++ b/ansible/security_check/roles/security_check/files/ubuntu.sh @@ -75,9 +75,9 @@ U_01() { fi fi # sshd_config 파일의 존재 여부를 검색하고, 존재한다면 ssh 서비스가 실행 중일 때 점검할 별도의 배열에 저장함 - sshd_config_count=`find / -name 'sshd_config' -type f 2> /dev/null | wc -l` + sshd_config_count=`find /etc/ssh -name 'sshd_config' -type f 2> /dev/null | wc -l` if [ $sshd_config_count -gt 0 ]; then - sshd_config_file=(`find / -name 'sshd_config' -type f 2> /dev/null`) + sshd_config_file=(`find /etc/ssh -name 'sshd_config' -type f 2> /dev/null`) fi # /etc/services 파일 내 ssh 서비스의 포트 번호가 설정되어 있는지 확인하고, 설정되어 있다면 실행 중인지 확인함 if [ -f /etc/services ]; then