From b669d2c4b688b1a8763bd4c4fdc45e69639044bb Mon Sep 17 00:00:00 2001 From: ByeonJungHun Date: Wed, 10 Jan 2024 15:47:03 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=80=EC=82=AC=20=EA=B2=B0=EA=B3=BC=20?= =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/security_check/roles/security_check/files/rocky.sh | 4 ++-- ansible/security_check/roles/security_check/files/ubuntu.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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