Skip to content

Instantly share code, notes, and snippets.

@nemith
Created February 18, 2018 15:19
Show Gist options
  • Save nemith/535a278fcb24c085b6552364fd7fde76 to your computer and use it in GitHub Desktop.
Save nemith/535a278fcb24c085b6552364fd7fde76 to your computer and use it in GitHub Desktop.
SSH Tunneling for lab access
SSH to the rescue
- Local forwarding `-L`<local`port>:<remote`ip>:<remote`port>`
- Remote forwarding `-R`<port`on`jump`host>:<local`ip>:<local`port>`
ssh -L 8179:10.0.0.31:179 -R :11019:localhost:11019 ntc@<jump host>
SSHD config
$ sudo vim /etc/ssh/sshd_config
Add GatewayPorts yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment