Skip to content

Instantly share code, notes, and snippets.

@akanehara
Created April 10, 2015 06:02
Show Gist options
  • Save akanehara/453c8e4c55676dbc9cad to your computer and use it in GitHub Desktop.
Save akanehara/453c8e4c55676dbc9cad to your computer and use it in GitHub Desktop.
Usage: ./ssh-test.sh <ssh_config_file>
#!/bin/bash
for h in `grep '^Host\s.*' $1 | awk '{print $2}'`; do
if ssh -F $1 $h :
then
echo $h " - CONNECTED!"
else
echo $h " - FAILED!"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment