From 1a3b8cb6e3e07b1894f88b78deaa6d24ebbbc67f Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Mon, 25 May 2020 14:27:07 -0500 Subject: [PATCH] Update gravity-sync.sh --- gravity-sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index f7febec..b2f486b 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -298,8 +298,8 @@ function validate_os_sshpass { MESSAGE="Testing SSH Connection" echo -e "${STAT} ${MESSAGE}" - # echo -e "${SSHPASSWORD} ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit'" - ${SSHPASSWORD} ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit' + echo -e "${SSHPASSWORD} ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit'" + timeout 5 ${SSHPASSWORD} ssh -o StrictHostKeyChecking=no ${REMOTE_USER}@${REMOTE_HOST} 'exit' error_validate }