mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
Update gravity-sync.sh
This commit is contained in:
parent
4b47893026
commit
0f18aa94fa
@ -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
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user