This commit is contained in:
2024-02-19 09:27:23 -06:00
parent 54d4c08192
commit c578606ca6
2 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS=2.3.25-01262024
VERS=2.3.26-02192024
DS_FOLDER=/opt/idssys/dsmon
DS_CRONTAB_FOLDER=/opt/idssys/nodemgmt/crontabs

View File

@@ -330,8 +330,13 @@ SETUPSSH(){
for hostid in "${!host_ip[@]}"; do
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
if [ "${checkhost}" != "false" ]; then
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - SSH KEY COPY${idsCL[Default]}${idsST[Reset]}"
ssh-copy-id root@${host_ip[$hostid]}
echo -en "\n${idsCL[LightCyan]}${host_name[$hostid]} - Checking for Public SSH Key ... ${idsCL[Default]}"
if [ "$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${nip} echo ok 2>&1)" == "ok" ]; then
echo -e "${idsCL[Green]}Already Installed${idsCL[Default]}"
else
echo -e "${idsCL[Yellow]}Copying to Host ...${idsCL[Default]}"
ssh-copy-id root@${host_ip[$hostid]}
fi
fi
done
}