-
-
Save dan82840/6449437a4dad8cc743f78e9ce4fe9092 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
SSH=/usr/bin/ssh | |
SSH_CONNECT_TIMEOUT=5 | |
for i in $(seq 1 3); do | |
eval "$SSH -o ConnectTimeout=$SSH_CONNECT_TIMEOUT $@" | |
ret=$? | |
if [ $ret -eq 0 -o $ret -eq 127 ]; then | |
exit $ret | |
fi | |
done | |
exit $ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment