Skip to content

Instantly share code, notes, and snippets.

@FZambia
Last active May 18, 2016 09:44
Show Gist options
  • Save FZambia/d777c7895ba61e5d88dc to your computer and use it in GitHub Desktop.
Save FZambia/d777c7895ba61e5d88dc to your computer and use it in GitHub Desktop.
making local port available through port on another machine via SSH tunneling
  1. Add into /etc/ssh/sshd_config on remote machine (remote.example.com):
GatewayPorts yes
  1. Restart sshd:
/etc/init.d/sshd restart 
  1. Connect via ssh
ssh -R 30000:127.0.0.1:80 fz@remote.example.com
  1. To check run:
netstat -tunelp | grep 30000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment