From 7457db098f955e0baf2c9a131b87e882802345ce Mon Sep 17 00:00:00 2001 From: ReachableCEO Date: Wed, 2 Jul 2025 08:15:55 -0500 Subject: [PATCH] . --- ProjectCode/Modules/Security/secharden-ssh.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ProjectCode/Modules/Security/secharden-ssh.sh b/ProjectCode/Modules/Security/secharden-ssh.sh index 9060b8b..7495bfa 100644 --- a/ProjectCode/Modules/Security/secharden-ssh.sh +++ b/ProjectCode/Modules/Security/secharden-ssh.sh @@ -20,6 +20,12 @@ for file in ${ProjectIncludeFiles[@]}; do done unset IFS +export SUBODEV_CHECK +SUBODEV_CHECK="$(getent passwd|grep -c subodev || true)" + +export LOCALUSER_CHECK +LOCALUSER_CHECK="$(getent passwd|grep -c localuser || true)" + export ROOT_SSH_DIR ROOT_SSH_DIR="/root/.ssh" @@ -52,6 +58,7 @@ if [ "$SUBODEV_CHECK" = 1 ]; then if [ ! -d $SUBODEV_SSH_DIR ]; then mkdir /home/subodev/.ssh/ fi +fi curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SSH/AuthorizedKeys/localuser-ssh-authorized-keys > /home/subodev/.ssh/authorized_keys \ && chmod 400 /home/subodev/.ssh/authorized_keys \