Skip to content

Instantly share code, notes, and snippets.

@remino
Created January 22, 2014 08:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remino/8555512 to your computer and use it in GitHub Desktop.
Save remino/8555512 to your computer and use it in GitHub Desktop.
ssh-via: Connect to SSH host via proxy
#!/bin/sh
ssl_via() {
if [ $# -lt 2 ]
then
ssl_via_usage
return
fi
ssl_via_main $@
}
ssl_via_main() {
proxy=$1
shift
ssh -o "ProxyCommand ssh -A $proxy nc %h %p" $@
}
ssl_via_usage() {
echo "Usage: `basename $0` proxy host [options]"
}
ssl_via $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment