Skip to content

Instantly share code, notes, and snippets.

@alphamarket
Created October 5, 2019 17:04
Show Gist options
  • Save alphamarket/80d18cc15446efc6184607278b955966 to your computer and use it in GitHub Desktop.
Save alphamarket/80d18cc15446efc6184607278b955966 to your computer and use it in GitHub Desktop.
creating an SSH proxy over a port
function ssh-proxy() {
echo "Running ssh-proxy at local port: 9999"
ssh -D 9999 -qCN $1
}
@alphamarket
Copy link
Author

alphamarket commented Nov 19, 2019

# it jumps the proxy from `$init_server` to `$target_server`
#  at first it connects to the `$init_server` and from `$init_server` reconnects to `$target_server`
#  eventually you connection goes through `$target_server` into the global internet.
function ssh-proxy-jump() {
    ssh -D 9999 -qCNJ $init_server $target_server
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment