Darrena
January 19th, 2005, 07:57 PM
VNC is a utility that allows you to remotely control your PC from another networked PC. VNC has been around a long time and works well enough on high bandwidth connections however by default it passes everything in the clear and is not secure. This HOW TO walks you through tunneling VNC through SSH to secure the traffic.
NOTE If you need to use your machine remotely FreeNX is MUCH better than VNC, however if you need access to your already logged in session VNC works well enough. If you need help jdong has a great HOW TO for FreeNX located here: http://www.ubuntuforums.org/showthread.php?t=1968
--------------------------------------------------------------------------------------------------------
On your Ubuntu desktop click computer->Desktop Preferences->Remote Desktop to bring up the VNC properties.
check the following boxes:
Allow other users to view your desktop
Allow other users to control your desktop
Require the user to enter this password *Enter your connection password here, you will be prompted for this when you connect*
UNCHECK the following:
Ask you for confirmation
Click close when you are finished.
-------------------------------------------------------------------------------------------------------
Download Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/ or use cygwin.
Start putty and enter the address you would like to connect to, select SSH as the protocol.
On the left hand side you will see various configuration options, click the category named
Tunnels and add the following information under add new forwarded port:
Source Port 5900
Destination Port 127.0.0.1:5900
*Optional* Go to the section labeled SSH and check enable compression, with some VNC clients this can cause slower response but with the generic realvnc client it works fine.
Save the session
-------------------------------------------------------------------------------------------------------
Download vncviewer from http://www.realvnc.com
(Or any of the various VNC clients out there like tightvnc or ultravnc)
Open the vncviewer and connect to 127.0.0.1
-------------------------------------------------------------------------------------------------------
Notes:
For added security use your hosts.allow to restrict connections from only localhost so that you must use SSH to connect.
If using a router, redirect TCP Port 22 (SSH) from the internet to your PC so you can connect remotely but you may want to use your hosts.allow or a filter on your router to only allow those connections from a trusted source.
If you are going through a firewall that blocks SSH you can redirect 80 or 443 with iptables.
If you have problems when using ULTRAVNC or TightVNC try using different encoding options, I had problems with the session when using ULTRAVNC and ZRLE
NOTE If you need to use your machine remotely FreeNX is MUCH better than VNC, however if you need access to your already logged in session VNC works well enough. If you need help jdong has a great HOW TO for FreeNX located here: http://www.ubuntuforums.org/showthread.php?t=1968
--------------------------------------------------------------------------------------------------------
On your Ubuntu desktop click computer->Desktop Preferences->Remote Desktop to bring up the VNC properties.
check the following boxes:
Allow other users to view your desktop
Allow other users to control your desktop
Require the user to enter this password *Enter your connection password here, you will be prompted for this when you connect*
UNCHECK the following:
Ask you for confirmation
Click close when you are finished.
-------------------------------------------------------------------------------------------------------
Download Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/ or use cygwin.
Start putty and enter the address you would like to connect to, select SSH as the protocol.
On the left hand side you will see various configuration options, click the category named
Tunnels and add the following information under add new forwarded port:
Source Port 5900
Destination Port 127.0.0.1:5900
*Optional* Go to the section labeled SSH and check enable compression, with some VNC clients this can cause slower response but with the generic realvnc client it works fine.
Save the session
-------------------------------------------------------------------------------------------------------
Download vncviewer from http://www.realvnc.com
(Or any of the various VNC clients out there like tightvnc or ultravnc)
Open the vncviewer and connect to 127.0.0.1
-------------------------------------------------------------------------------------------------------
Notes:
For added security use your hosts.allow to restrict connections from only localhost so that you must use SSH to connect.
If using a router, redirect TCP Port 22 (SSH) from the internet to your PC so you can connect remotely but you may want to use your hosts.allow or a filter on your router to only allow those connections from a trusted source.
If you are going through a firewall that blocks SSH you can redirect 80 or 443 with iptables.
If you have problems when using ULTRAVNC or TightVNC try using different encoding options, I had problems with the session when using ULTRAVNC and ZRLE