You are on page 1of 14

Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Cloud Fusion Middleware Fusion Applications About Log in

Using VNC securely in the Oracle Cloud


April 28, 2016 by Roland Koenn 1 Comment

Introduction
Having access to a VM in the Cloud via VNC can be very useful in many situations e.g. most customers wan
software using GUI based installer, e.g. Oracle Database etc. Using VNC the installation can continue, even w
connected. The easiest way to achieve this with a reliable and secure mechanism is to use VNC via a SSH Tu
example a simple Oracle Compute Cloud VM is used to configure a Gnome Desktop & VNC Server. It has bee
shown in the tutorial here. Most other VMs in the Oracle Cloud that run Oracle Linux can be configured in the s
e.g. DBaaS VMs.

Configure SSH Tunnel


The SSH Tunnel is established using the Putty Tool alternatives will be discussed later in this tutorial. Use the
address of the created VM and give it the session a name.

1 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Social Facebook Arch Beat Twitter OTN Group FMW Group


Copyright Information Privacy at Oracle Terms of use About the A-Team

All content and s/w code on this site are offered without any warranty, or promise of operational quality or
functionality.

Next expand the session tree on the left hand side and select the category Data in the Connection branch. P
Oracle Cloud VMs are configured with the user opc. For easier login enter opc in the Auto-login username fie

2 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Expand the SSH branch and select Tunnels. Here enter 5901 as source port and the Public IP of the VM in
1.1.1.1:5901. Here 5901 is the destination port. Click add. All VNC traffic is routed through this tunnel, hence n
port needs to be opened via Security Lists. See this MOS Note should you want to use iptables Doc ID 210242

3 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Next navigate to Auth in the SSH branch and point to the private key that has the authentification informatio
provided during the provisioning of the VM. See this tutorial, if you are unsure which key to use: SSH Keys

4 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Finally navigate back to the Session category. Press the Save Button and then press Open to establish the

5 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Configure VNC Server


If everything is configured correctly you will be greated by the usual prompt.

6 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Install the GNOME desktop via yum. To achive this switch to the root user and then use the groupinstall functio
sudo su -
yum -y groupinstall "Desktop"
If you have issue with yum follow this simple tutorial. If you have problems try to disable or remove all existin
repositories by running:
rm -rf /etc/yum.repos.d/*
yum clean all
Then rerun the steps in the tutorial.

7 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Alternatively KDE desktop can be installed using:


yum -y groupinstall kde-desktop

Make sure that there are no errors and look for the Complete! message once everything is installed.

8 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Install additional tools to help with your activities, like a browser (here Firefox) or even an Office Suite. Most im
install tigervnc-server to allow access to the desktop.
yum -y install tigervnc-server
yum -y install firefox
yum -y groupinstall "General Purpose Desktop"

9 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

After all packages are installed simply issue:


vncserver
This will start the VNC server with the default settings, e.g. port 5901 for display :1 etc. These settings can be c
configuration file: /home/opc/.vnc/xstartup.

Should you want to use iptables, also run:


iptables -I INPUT -m state --state NEW -p tcp --destination-port 5901 -j ACCEPT

<a href="http://www.ateam-oracle.com/wp-content/uploads/2016/04/image12.png" rel="attachme

Connect to the VNC Server


Next start your local VNC viewer on your local client. The SSH tunnel redirects the VNC output of your VM to y
on port 5901. Hence enter localhost:5901 in the VNC Server field and press Connect.

10 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

The first time you connect you will be issued a warning, that the connection is not encrypted. As we are using a
to encrypt the traffic this warning can be ignored.

Enter the password you have selected for the VNC Server.

This will connect you to the Desktop. This Desktop will be active, even if you disconnect the Putty Session th
resume work comfortably.

11 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

To stop the VNC Server simply connect via putty or open a terminal and enter:
vncserver kill :1
If you prefer to have a different resolution simply start the vncserver using the geometry flag and the prefered r
vncserver kill :1
vncserver -geometry 1600x1200
Note that the Desktop has a timeout, after which the screen locks and you have to authenticate via password,
password run:
sudo passwd opc

Further Reading
Configure tigervnc-server on Oracle Linux 7 (Doc ID 2102424.1)

12 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

Access VNC Server Through A Web Browser (Doc ID 1555696.1)

All site content is the property of Oracle Corp. Redistribution not allowed without written permission

filed under: a-team chronicles , cloud , operating systems , paas , security , uncategorized tagged with:
vm , vnc

Comments

Kumar Allamraju says:


July 20, 2017 at 3:27 PM
Good One.. It was helpful

Log in to Reply

Add Your Comment


You must be logged in to post a comment.

Search this website Search

Share

Categories
Categories

13 di 14 01/09/17, 18:26
Using VNC securely in the Oracle Cloud http://www.ateam-oracle.com/vnc-in-the-oracle-...

A-Team Chronicles (255)

Recent Posts
Build ATG Commerce applications in
Oracle Developer Cloud

Configure Oracle Management Cloud


(OMC) with ATG Commerce

Adding Web Service Trusted


Certificates to a Wallet in Oracle
Database Cloud Service

Using RLClient to move ATG


Commerce file assets

Global debugging ATG Commerce


applications

ICS SOAP Connection Retrieve File


Uploaded WSDL

ICS File handling options and tips.

Archives
Archives

Select Month

14 di 14 01/09/17, 18:26