update
This commit is contained in:
@@ -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
|
||||
|
||||
9
dsmon.sh
9
dsmon.sh
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user