I have just setup my server with ubuntu desktop, after running the sudo apt-get install-desktop, and rebooting I now want to login to the dektop remotely, from my Windows PC. How do I enable remote VNC / Teamviewer access via the SSH command line?
I have just setup my server with ubuntu desktop, after running the sudo apt-get install-desktop, and rebooting I now want to login to the dektop remotely, from my Windows PC. How do I enable remote VNC / Teamviewer access via the SSH command line?
One alternate would be to use FreeNX . Freenx is secure and faster then VNC.
See The Ubuntu Wiki FreeNX page.
If you want to tunnel VNC over SSH I personally would use an alternate VNC server, vnc4server.
You would then ssh in with putty, tunnel the VNC port over SSH, start the vncserver, and then connect with a vnx client.
It might sound complex, but there is a very nice walk through here:
Tunnelling VNC over SSH with PuTTY
It is a graphical guide (best one I know) doing exactly what you want.
The advantage of tunneling over ssh is the it increases security.
I would also advise you use keys and disable password authentication.
Ubuntu wiki ssh keys
And finally, here is a walk through on how to import open-ssh keys to putty
Putty import ssh keys
There is a builtin vnc server vino, however to configure it remotely without a gui is painfull. The easiest it to run
ssh vino-preferences
from a linux LiveCD. You can usevino-passwd
to set the password.Alternative is to install
x11vnc
(from x11vnc package). No need gui to configure. Just install and run it from the putty window.If you are not logged as a user on that ubuntu box, then you will need to do some tricks with X cookie permissions. It is described in error message from the
x11vnc
command (just the file path is bit different in Ubuntu). Sorry, I don't remember the details, but it wasn't difficult.It is better (safer) to start vnc server only on 127.0.0.1 and tunnel it over secure SSH tunnel (there are options for that in putty).
Good luck.