Last active
January 28, 2017 10:01
-
-
Save rhenning/d2c999f1f10b6cb4fe0c to your computer and use it in GitHub Desktop.
Parallel SSH via OpenVPN gateway
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/bash | |
gw=$1 | |
hosts=$2 | |
shift 2 | |
pssh --option ForwardAgent=yes --option StrictHostKeyChecking=no --option ProxyCommand="ssh -qW %h:%p -o StrictHostKeyChecking=no openvpnas@${gw}" --user ubuntu --hosts $hosts --print $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment