Created
November 14, 2018 16:02
-
-
Save jsmolina/67ed8d099e250b4040f8d7b05852e32c to your computer and use it in GitHub Desktop.
Blocks until host is reachable by SSH. Useful for opening a VPN asynchronously and waiting for connection to be ready.
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
#!/usr/bin/env bash | |
until nc -nz $1 22 -w 5 &>/dev/null; do :; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment