get a vnc session forwarded

This is basic ssh port forwarding, but i always forget…
so, you have hosta, hostb and yourpc.
you’re not in the same network as hostb, so you need to connect this way
yourpc –> hosta —> hostb
and you have a vnc session at hostb:1 (5901)
you want to connect to hosta:11 (5911) and get your vnc screen at hostb:1 (5901)
All you have to do is, from hosta
rdircio@hosta $ ssh -g -C hostb -L 5911:localhost:5901
then point the vnc client on yourpc to hosta:11.
196/433

Leave a Reply

Your email address will not be published. Required fields are marked *