I'm not going to be in front of my ubuntu machine for a while but I very much need to be able to remote desktop to it.

In an ssh session, what's the best route to take to set-up and allow certain users to remote desktop to my machine?


1 Answer 1


One option is to use a little script that tunnels the remote desktop session (using x11vnc) over the ssh,

file: vncoverssh



ssh -f -L 5900:localhost:5900 $USERHOST \
  x11vnc -scale 0.5 -safer -localhost -nopw -once -display :0 \
  && sleep 5 \
  && vncviewer -encodings "tight" localhost:0

This can then be called using

vncoverssh USER@HOST

This script can be modified to store the user and host name if desired.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .