Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

15.3.3. Connecting to VNC Server Using SSH

VNC is a clear text network protocol with no security against possible attacks on the communication. To make the communication secure, you can encrypt your server-client connection by using the -via option. This will create an SSH tunnel between the VNC server and the client.
The format of the command to encrypt a VNC server-client connection is as follows:
vncviewer -via user@host:display_number

Example 15.6. Using the -via Option

  1. To connect to a VNC server using SSH, enter a command as follows:
    $ vncviewer -via joe@192.168.2.101 127.0.0.1:3
  2. When you are prompted to, type the password, and confirm by pressing Enter.
  3. A window with a remote desktop appears on your screen.
For more information on using SSH, see Chapter 14, OpenSSH.