Access a VM Through Virtual Network Computing (VNC)

You can access the services and resources that an Oracle SOA Cloud Service VM provides by logging into the VM through VNC.

You can use any VNC client utility to access a VM. For example, if you are using Windows, you might use RealVNC or TightVNC; if you are using Linux, you might use the vncviewer utility included with your Linux distribution.

By default, the port used by the VNC server on a Oracle SOA Cloud Service VM is not directly accessible through the Internet. An SSH tunnel enables access to the VNC server port on your local machine. An SSH tunnel also ensures that VNC communication is using a secure channel.

In order create a VNC session on a VM, you must first identify the public IP address and connect to it with SSH:

  1. Use the ssh command to connect to the VM:
    ssh -i private_key opc@VM_IP_address
  2. Change to the oracle user:
    sudo su - oracle


    The oracle VM user has regular OS user permissions. It is intended to be used to start and stop Oracle products that have been installed on the VM, or to run other Oracle applications and utilities on the VM.
  3. Disable the desktop screensaver lock for this user:
    gconftool-2 -s -t bool /apps/gnome-screensaver/lock_enabled false
    This Linux property controls whether or not the desktop prompts you for the user’s password when in screensaver mode.
  4. Start the VNC server on the VM:
    vncserver :1 -nolisten tcp -localhost -geometry 1680x1050

    Use the following command to confirm if the VNC server started:

    ps -ef|grep vncserver


    The VNC server is not directly accessible from clients outside of this VM. An SSH tunnel will be used to enable external and secure access to the VNC server.

    By default, the listen port for VNC session :1 is 5901, session :2 is 5902, and so on.

    If your local machine has a smaller display resolution, use a different geometry setting such as 1024x768.

  5. When prompted, enter a password for this VNC session.
  6. Disconnect from the VM.
  7. Create an SSH tunnel to localhost:5901 on the VM.
    ssh -i path_to_private_key -L 5901:localhost:5901 opc@VM_IP_address -N

    For example:

    ssh -i /home/myuser/id_rsa -L 5901:localhost:5901 opc@ -N
  8. Launch your VNC client application and connect to localhost:5901.
  9. When prompted, enter the password that you previously configured for this VNC session.
You can use VNC to work with any resource accessible from the VM, including graphical applications. For example, you can launch the Fusion Middleware Configuration Wizard application on the Administration Server VM.


After your VNC work is complete, you can perform a <ctrl> C to shut down the SSH tunnel.


To terminate the VNC server on the VM, run vncserver —kill :1.