Blog Archives

Connect OCI with VNC as GUI

Oracle Instance will be connected with VNC using GUI.

  1. Configuring OCI server
    • Install group “Server with GUI”
    • Install tigervnc
    • Starting vncserver
  2. Configuring VNC Client(using MobaXterm as VNC Client)
    • Opening new VNC viewer session
    • VNC viewer setup
    • SSH Gateway setup

Prerequisite

  1. OCI Instance with VCN Configured
  2. MobaXterm for VNC Client
  3. ssh client

In this blog windows powershell will be used. The OCI Instance used is Always free instance created with Oracle Cloud Development kit.

Configuring OCI server

Step : 1 Install group “Server with GUI”

Connect to the server using ssh and change the user to root

[opc@instance20210514111021 ~]$ sudo bash
[root@instance20210514111021 opc]# yum -y groups install "Server with GUI"
Loaded plugins: langpacks, ulninfo
--------

Once the packages are installed then check with the below command

[root@instance20210514111021 opc]# yum -y groups list "Server with GUI"
Loaded plugins: langpacks, ulninfo
Installed Environment Groups:
   Server with GUI
Done

Step : 2 Install tigervnc

[root@instance20210514111021 opc]# yum -y install tigervnc-server
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package tigervnc-server.x86_64 0:1.8.0-22.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                          Arch                                    Version                                          Repository                                   Size
=============================================================================================================================================================================================
Installing:
 tigervnc-server                                  x86_64                                  1.8.0-22.el7                                     ol7_latest                                  211 k

Transaction Summary
=============================================================================================================================================================================================
Install  1 Package

Total download size: 211 k
Installed size: 498 k
Downloading packages:
tigervnc-server-1.8.0-22.el7.x86_64.rpm                                                                                                                               | 211 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : tigervnc-server-1.8.0-22.el7.x86_64                                                                                                                                       1/1
  Verifying  : tigervnc-server-1.8.0-22.el7.x86_64                                                                                                                                       1/1

Installed:
  tigervnc-server.x86_64 0:1.8.0-22.el7

Complete!

Step 3 : Starting vncserver

While starting vncserver it will ask for password. The provided password will be used to connect VNC viewer client.

[root@instance20210514111021 opc]# vncserver

You will require a password to access your desktops.

Password:
Verify:
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
xauth:  file /root/.Xauthority does not exist

New 'instance20210514111021:1 (root)' desktop is instance20210514111021:1

Creating default startup script /root/.vnc/xstartup
Creating default config /root/.vnc/config
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/instance20210514111021:1.log

The number that appears after the host address is the display number (it is underlined in red in the image above). By adding this number to 5900, this will give you the port number used to connect your VNC viewer to the VNC session. 

For example, if your display number is 4, your port number is 5904. If your display number is 12, your port number is 5912.

The VNC session is now running on the remote Linux host system and is ready to connect with your VNC viewing software.

Configuring VNC Client(using MobaXterm as VNC Client)

Step 4 : Opening new VNC viewer session

In MobaXterm, click on the Session button in the upper left hand corner

Step 5 : VNC viewer setup

In the window that pops up, look for the VNC icon in the top row and click on it

  • In the Remote hostname or IP address box, enter localhost
  • In the Port box, enter your Port Number. Recall that this is 5900 plus the Display Number that appeared after running the vncserver command

Step 6 : SSH Gateway setup

In the lower area, click on the Network Settings tab, and then click on the SSH gateway (jumphost) button.

In the window that pops up, enter the following

  • In the Gateway host box, enter the address of the host machine that your VNC session is running on(Copy the IP address from OCI Instance)
  • In the Username box, enter your opc username
  • In Port, leave it set at 22
  • Select the ssh key file. Do not check off the box for Use SSH key.

Password will be prompted and once given GUI is connected

Design a site like this with WordPress.com
Get started