Skip to content

Instantly share code, notes, and snippets.

@dedeibel
Last active July 1, 2019 16:31
Show Gist options
  • Save dedeibel/fcfebf131b5aff89f1bfee4a0f00baa5 to your computer and use it in GitHub Desktop.
Save dedeibel/fcfebf131b5aff89f1bfee4a0f00baa5 to your computer and use it in GitHub Desktop.
wait until a given host has an open ssh port
#!/bin/bash
HOST=$*
until nc -vzw 2 "$HOST" 22; do sleep 2; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment