Skip to content

Instantly share code, notes, and snippets.

View dclausen's full-sized avatar

Dave Clausen dclausen

View GitHub Profile
@dclausen
dclausen / ssh-retry.sh
Created October 18, 2016 15:21 — forked from 9point6/ssh-retry.sh
Keep retrying SSH connection until success (Useful for waiting for VMs to boot)
#!/usr/bin/env bash
# Check we've got command line arguments
if [ -z "$*" ] ; then
echo "Need to specify ssh options"
exit 1
fi
# Start trying and retrying
((count = 100))