Update nodemgmt-scripts.sh

This commit is contained in:
2023-11-25 23:52:53 -06:00
parent e354d642db
commit 18f565be3c

View File

@@ -744,8 +744,14 @@ SETUPSSH(){
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Default]}"
DIVIDER . lightCyan 40
if [ ! -f ${NM_TMPFOLDER}/${nip}.down ]; then
echo -e "\n${idsCL[LightCyan]}Copying Public SSH Key ...${idsCL[Default]}"
ssh-copy-id root@${nip}
echo -en "\n${idsCL[LightCyan]}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 "\n${idsCL[Green]}Already Installed${idsCL[Default]}"
else
echo -e "\n${idsCL[Yellow]}Copying to Host ...${idsCL[Default]}"
ssh-copy-id root@${nip}
fi
echo -en "\n${idsCL[LightCyan]}Verifying NodeMgmt ... ${idsCL[Default]}"
NODEUPDATE ${nip} verify "ssh"
else