Prerequisites
To setup a free linux instance on Oracle Cloud Infrastruture is necessary to have a Oracle Cloud Account, otherwise sign up for a Oracle Cloud Free Tier.
Toolbox
Networking
Login into Oracle Cloud Infrastructure portal and from the sandwich menu follow the path Networking > Virtual Cloud Networks
.
Click on Start VCN Wizard
button and then select Create VCN with Internet Connectivity
.
Fill the VCN Name
with something like oci-vcn-<virtual-cloud-network-name>
, then click Next
, finally Create
.
Linux Instance
From the sandwich menu follow the path Compute > Istances
and click Create istances
.
Fill the Name
with something like oci-instance-<instance-name>
.
In the section Image and shape
click Edit
then Change image
to select your preferred image.
Select Canonical Ubuntu
for example, Always Free-eligible, and click Select image
.
Leave the default shape VM.Standard.E2.1.Micro
which is Always Free-eligigble.
Check if the Networking
section displays the previously created virtual cloud netowkr.
In the Add SSH keys
select the option Generate a key pair for me
.
Click on Save Private Key
to save the private key file to name something like oci-instance-<istance-name>-ssh-key-YYYY-MM-DD.key
.
Click on Save Private Key
to save the public key file to name something like oci-instance-<istance-name>-ssh-key-YYYY-MM-DD.key.pub
.
Finally click Create
.
SSH Private Key Conversion
Execute PuTTYgen and clcik Load
button to load the private key oci-instance-<istance-name>-ssh-key-YYYY-MM-DD.key
.
From menu bar follow the path Key > Parameters for saving key files...
and select PPK file version: 2
, then close the dialog and click Save private key
to save the converted private key file to name something like oci-instance-<istance-name>-ssh-key-YYYY-MM-DD.ppk
.
Setup SSH Connection
From the sandiwich menu of Oracle Cloud portal follow the path Compute > Istances
, select the created instance and from Instance information
section copy the Public IP address
under the Instance access
subsection.
Execute PuTTY and in the Session
frame fill the Host Name (or IP address)
with the Public IP address
copied from the Oracle Cloud portal, leave the default Port: 22
.
In the same Session
frame fill the Saved Sessions
with something like oci-instance-<istance-name>-putty
.
Under the PuTTY frame path Connection > SSH > Auth
, in the group Authentication parameters
, click Browse
and select oci-instance-<istance-name>-ssh-key-YYYY-MM-DD.ppk
as Private key file for authentication
.
Finally from Session
frame of PuTTY click Save
.
SSH Login
From PuTTY Session
frame, select oci-instance-<istance-name>-putty
, click Load
and then Open
.
From the sandiwich menu of Oracle Cloud portal follow the path Compute > Istances
, select the created instance and from Instance information
section copy the Username
under the Instance access
subsection.
In PuTTY console when promt login as:
input the username copied and login.