2017年2月3日 星期五

ssh port forward

Local Port Forward
(On MYPC) ssh -L A:B:X:Y HOST
On  MYPC, map A:B to access X:Y via HOST
A is usually 0.0.0.0, 127.0.0.1, or any existing IP on HOST

ssh -L 8080:localhost:80 prod -o GatewayPorts=yes
ssh -L 0.0.0.0:8080:localhost:80 prod

Remote Port Forward
(On MYPC) ssh -R A:B:X:Y HOST
On HOST, map A:B to access X:Y via MYPC
A is usually 0.0.0.0, 127.0.0.1, or any existing IP on MYPC



tunnel - Reverse port tunnelling - Ask Ubuntu
http://askubuntu.com/questions/50064/reverse-port-tunnelling

Why can I not connect to a reverse SSH tunnel port remotely, even with GatewayPorts enabled? - Super User
http://superuser.com/questions/767524/why-can-i-not-connect-to-a-reverse-ssh-tunnel-port-remotely-even-with-gatewaypo

networking - How does reverse SSH tunneling work? - Unix & Linux Stack Exchange
http://unix.stackexchange.com/questions/46235/how-does-reverse-ssh-tunneling-work

沒有留言: