Skip to content

Instantly share code, notes, and snippets.

@terabyte
Created October 17, 2017 22:59
Show Gist options
  • Save terabyte/17e156c5619018a2baed6363643e9f3d to your computer and use it in GitHub Desktop.
Save terabyte/17e156c5619018a2baed6363643e9f3d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
PROXY_HOST="foo@example.com"
PROXY_ARGS="-o ProxyCommand='ssh $PROXY_HOST nc %h %p'"
echo "ssh ${PROXY_ARGS} bar@other.example.com"
RESULT="$(ssh ${PROXY_ARGS} bar@other.example.com)"
echo "RESULT=$RESULT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment