diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index eff46968..be680d8f 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -743,10 +743,14 @@ SETUPSSH(){ if [[ ${RUN_NODE_IP} != *"${nip}"* ]]; then echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Default]}" DIVIDER . lightCyan 40 - echo -e "\n${idsCL[LightCyan]}Copying Public SSH Key ...${idsCL[Default]}" - ssh-copy-id root@${nip} - echo -en "\n${idsCL[LightCyan]}Verifying NodeMgmt ... ${idsCL[Default]}" - NODEUPDATE ${nip} verify "ssh" + 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]}Verifying NodeMgmt ... ${idsCL[Default]}" + NODEUPDATE ${nip} verify "ssh" + else + echo -e "\n${idsCL[Yellow]}Host is offline${idsCL[Default]}" + fi echo fi done