Skip to content

Instantly share code, notes, and snippets.

@rhenning
Last active February 11, 2016 20:33
Show Gist options
  • Save rhenning/b26f17d14efe64b2fef9 to your computer and use it in GitHub Desktop.
Save rhenning/b26f17d14efe64b2fef9 to your computer and use it in GitHub Desktop.
SSH via OpenVPN gateway
#!/bin/bash
gw=$1
target=$2
shift 2
ssh -o StrictHostKeyChecking=no -o ProxyCommand="ssh -o StrictHostKeyChecking=no -W %h:%p openvpnas@${gw}" $target -l ubuntu $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment