Skip to content

Instantly share code, notes, and snippets.

@robdmc
Last active February 1, 2021 02:31
Show Gist options
  • Select an option

  • Save robdmc/9677271cbddab46cc929903756a5996b to your computer and use it in GitHub Desktop.

Select an option

Save robdmc/9677271cbddab46cc929903756a5996b to your computer and use it in GitHub Desktop.
ssh port forwarding
# ssh -L<port_on_local_machine>:<remote_machine_as_seen_from_remote_machine>:<port_on_remote_machine> <remote_machine_as_seem_from_local_machine>
# In the example above, all traffic sent to port 5901 on your local host is
# being forwarded to port 4492 on the remote server located at 188.17.0.5.
ssh –L 5901:188.17.0.5:4492 [email protected]
# Another example. This makes it look like a jupyter server on port 8888 of the miner1 host
# is running on port 8888 of your local machine
ssh -L8888:localhost:8888 miner1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment