Skip to content

Instantly share code, notes, and snippets.

@rhenning
Last active January 28, 2017 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rhenning/d2c999f1f10b6cb4fe0c to your computer and use it in GitHub Desktop.
Save rhenning/d2c999f1f10b6cb4fe0c to your computer and use it in GitHub Desktop.
Parallel SSH via OpenVPN gateway
#!/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