Ok, I cannot seem to get VNC connection to work. I'm not sure if I understand it. So:
I want to connect from my home pc (let's call it athome
) to my work desktop (let's call it atwork
, but I have to tunnel through a connection server (let's call it workserver
).
So can someone explain me how I can use, e.g., Vinagre to connect from athome
to atwork
via workserver
(and share the desktop, which I enabled at atwork
vino-preferences)? I can get access them all fine via ssh in the terminal, but I can't get Vinagre to connect.
I've tried with the "Use host … as SSH tunnel" option. It didn't work.
I've tried ssh -v -N -R 5902:atwork:5902 user@workserver
in the terminal and then connect to localhost:5902
, but it didn't work.
I'm probably doing something wrong, so I would be very happy if someone could explain me clearly how it should be done.
Thanks
Best Answer
I was able to simulate (I hope) your situation, if I understood it.
The need is to connect to a machine
atwork
's VNC server.atwork
is not accessible via ssh from the client machineathome
. However,atwork
is accessible via ssh from the intermediate machineworkserver
.workserver
is accessible via ssh fromathome
.If this is the correct scenario, I was able to connect in a similar situation. I used
remmina
which by default tries to connect on port 5900. Here is how I did it using intermediate port 5901. Adjust ports as necessary in your situation.Set up first tunnel from
athome
toworkserver
.Set up 2nd tunnel from
workserver
toatwork
SSH into
workserver
and enter the next command. Leave this ssh window open.Back on
athome
, startremmina
and connect tolocalhost
Somewhat to my surprise, it worked.
When done, go back into the
workserver
ssh window andkillall ssh
. Thenkillall ssh
onathome
.