Now we are all working from home, I’ve noticed that my MAC laptop is severely overloaded when I do live demos during webinars. After all, it’s running my camera, Zoom, PowerPoint, my Java app, and monitoring tools.
So, I decided it was time to move my demo environment to the Oracle Cloud, where I quickly provisioned a 2-OCPU VM running Linux following the instructions in my previous blog post.
Once I had my VM up and running, I wanted a proper desktop experience, so I needed VNC.
After a quick google search, I found the video below, which provides a very easy to follow, step by step guide to installing and configuring TigerVNC VNCServer on OCI infrastructure. I followed all of these steps except for the final stage where they describe adding the VNCServer to your firewall.
I’m married to a security expert, who strongly advised against this approach. He told me it would be far more secure to use an SSH tunnel instead of opening the firewall for the VNC port.
Below the video are the full set of commands I used in my setup, including how to establish the ssh tunnel, so you can quickly cut and paste them.
Continue reading “How to setup VNCServer on an OCI VM?”
This blog post outlines the 10 simple steps necessary to provision, and connect to, a VM on Oracle Cloud Infrastructure (OCI).
- Confirm you have an SSH Public Key on your laptop or localhost.
$ cd ~/.ssh
— check if you have an existing if you have a key already
id_rsa id_rsa.pub known_hosts
You’re looking for a file named either id_dsa or id_rsa and a matching file with a .pub extension. The .pub file is your public key, and the other file is the corresponding private key. If you don’t have these files or you don’t remember your passphrase, you will need to complete the steps outlined here.NOTE: You can’t move on unless you have your SSH Public key.
- Connect to the OCI console to begin the provisioning process.
From the hamburger menu in the upper left-hand corner select, the Compute menu item followed by the Instances option.
- On the Instances page, click the Create Instance button.
- Specify a unique name for your instance and accept the default Oracle Linux image.
- Scroll down and click on the Change Shape button.
- To run my demos I typically use Swingbench, which needs a minimum of 2 OCPUs (4 OCPUs if you use the JSON workload). So, I select a Virtual Machine with Intel Skylake processors and 2 OCPUs. Then click the Select Shape button.
- I use the automatic defaults in the Configure Networking and Boot Volume sections and move on to the SSH Key section.Here I select Paste SSH Keys and cut and paste my public key from my .ssh directory into the window provided.
- Finally hit the Create button at the end of the page.
- Instantly you will see a new VM is being provisioned for you. Once available, you can connect to the machine using the public IP address and the user OPC. You will find the IP address, on the main Instance console page.
- Simply ssh into the machine from your laptop using the supplied OPC user.
$ ssh opc@XXX.XXX.XX.XXX
Enter passphrase for key '/Users/sqlmaria/.ssh/id_rsa':
Last login: Tue Jul 28 16:39:35 2020 from XXXXX