Host auth check fi for new clone
This commit is contained in:
@@ -46,7 +46,8 @@ else
|
|||||||
# grep "IdentityFile" in this
|
# grep "IdentityFile" in this
|
||||||
SSH_TEST=("${SUDO_COMMAND[@]}" "ssh" "${REMOTE_HOST}");
|
SSH_TEST=("${SUDO_COMMAND[@]}" "ssh" "${REMOTE_HOST}");
|
||||||
result=$("${SSH_TEST[@]}" 2>&1);
|
result=$("${SSH_TEST[@]}" 2>&1);
|
||||||
validate_string="You've successfully authenticated with the key"
|
# this can be key or deploy key
|
||||||
|
validate_string="You've successfully authenticated with the "
|
||||||
if [[ "$result" != *"$validate_string"* ]]; then
|
if [[ "$result" != *"$validate_string"* ]]; then
|
||||||
echo "Could not connect to ${REMOTE_HOST}: ${result}";
|
echo "Could not connect to ${REMOTE_HOST}: ${result}";
|
||||||
error=1;
|
error=1;
|
||||||
|
|||||||
Reference in New Issue
Block a user