From 0f18aa94fa5498865c50b3cd016250aa6180d1a2 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Mon, 25 May 2020 14:03:15 -0500 Subject: [PATCH] Update gravity-sync.sh --- gravity-sync.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 6dcc21f..dced6bb 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -279,9 +279,9 @@ function validate_os_sshpass { SSHPASSWORD='' MESSAGE="Using SSH Key-Pair Authentication" else - ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit' + ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit' >/dev/null 2>&1 if [ "$?" != "0" ]; then - SSHPASSWORD="sshpass -p '${REMOTE_PASS}' " + SSHPASSWORD="sshpass -p ${REMOTE_PASS}" MESSAGE="Using SSH Password Authentication" else sshpassword='' @@ -298,7 +298,7 @@ function validate_os_sshpass { MESSAGE="Testing SSH Connection" echo -e "$STAT $MESSAGE" - ${sshpassword}ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit' + ${sshpassword} ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit' error_validate }