diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 321a605b..aeaa0729 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -367,6 +367,10 @@ NODEUPDATE(){ if [ "${betacheck}" == "false" ]; then if [ "${2}" != "sync" ]; then [ ${noup} -eq 0 ] && echo -en " ~ ${idsCL[LightCyan]}NodeMGMT${idsCL[Default]} : " + if [ "$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${nip} echo ok 2>&1)" != "ok" ]; then + echo -e "${idsCL[Yellow]}New server, needs SSH credentials${idsCL[Default]}" + ssh-copy-id root@${nip} + fi if ! ${NCMD} command -v nodemgmt > /dev/null; then ${NCMD} "bash <(curl -sL https://go.scity.us/install-nodemgmt)" >/dev/null 2>&1 ${NMCMD} rsync -az ${NM_FOLDER}/conf/*.inc ${NM_FOLDER}/conf/*.conf root@${nip}:${NM_FOLDER}/conf/ & >/dev/null 2>&1