Skip to content

Instantly share code, notes, and snippets.

@hanishassim
Forked from belo82/ssh_tunnel.sh
Created May 16, 2017 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanishassim/74ea664d39809f0e4feb1dbdbb923258 to your computer and use it in GitHub Desktop.
Save hanishassim/74ea664d39809f0e4feb1dbdbb923258 to your computer and use it in GitHub Desktop.
SSH tunnel from local port 9200 to remote port 9200 (-f: run in background -N: don't execute command in remote system)
ssh -f -L 9201:localhost:9200 <username>@<host> -N
# To kill tunnel running in background run:
ps aux | grep 9201
kill <pid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment