-
Change server sshd_config to allow client binding artitray network interface
GatewayPorts yes
-
Use
-R [bind_address:]port:host:hostport
to setup port forwarding.bind_address
should be 0.0.0.0, which means binding on all network addresses. Following example forward local ports 3000 to server 8080, and local ports 22 to server 2222. So others can open http://server:8080 to access your web server, andssh -p 2222 server
to log into your local machine.ssh -R 0.0.0.0:8080:localhost:3000 -R 0.0.0.0:2222:localhost:22 server
-
-
Save dafang/4369760 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment