Reverse Tunneling / Reverse port forwarding in SSH
I want to know how to do reverse port forwarding or reverse tunneling using SSH.
Reason: I have set up VNC server in my lab system (labby) and want to work on that, from hostel, using my laptop (noty). Needless to say the labby is behind firewall (131.x.y.z).
I have set up a VNC viewer in my noty to work on labby through VNC. I can establish a SSH connection to my Lab using this tunnel forwarding method.
# ssh -L 5900:labby:22 131.x.y.z -l user_name_in_labby
Then in another new terminal
# ssh -Y 127.0.0.1 -p 5900 -l user_name_in_labby
The first command is to set up a local host in labby and second command is to connect to that using my noty's port 22 (please correct me if I am wrong, I am a mechanical engineer)
But now I want to do reverse tunneling. I searched several tips from google and failed to find the answer to the case I wanted.
Please refer the attachment to see the network diagram (vnc_rpf.png
What I want is reverse port forwarding from labby and listening in noty.
Means my noty should listen to labby using a ssh command in my noty.