This post discusses the Troubleshooting Steps for Connectivity Issues you can face while connecting to a Compute/Database Instance in Oracle Cloud (OCI).
Let’s start with the pre-checks you should follow before connecting to the Compute/Database Instance.
PRE-CHECKS:
- The Instance should be created in the Public Subnet.
- Subnet should have a Route to the Internet Gateway.
- Port 22 (Linux)/3389 (Windows) should be Open in the Security List.
- Use the correct SSH Private Keys.
- If connected to the office VPN/network, Port 22/3389 should be open.
Check 1: Subnet Should be Public.
Note: To connect to your Instance, you’ll need its public IP address. You will get the public IP only when you have used the Public Subnet while creating the Instance. If you have selected the Private Subnet, you can’t change it to the public and you will have to create a new Instance in the Public Subnet.
Steps to Get the Public IP of the Compute Instance:
- In the Console, click on “Compute”.
- Click on the Instance name to see its details.
Image may be NSFW.
Clik here to view.
3. Make a note of the Public IP Address.
Image may be NSFW.
Clik here to view.
Steps to Get the Public IP of the Database Instance:
Note: You will get the public IP only if you have used the Public Subnet. If you have selected the Private Subnet, you can’t change it to the public, and you will have to create a new Instance.
- Login to the OCI Console and navigate to the Database section.
Image may be NSFW.
Clik here to view.
2. Click on the Database name on which you want to connect.
Image may be NSFW.
Clik here to view.
3. On the left side of the Database Instance Details page, click on Nodes under the Resources.
Image may be NSFW.
Clik here to view.
Check 2: Route to the Internet Gateway (IGW).
Next Step is to check the Public Subnet belonging to the Instance should have a Routing Table going to the Internet Gateway.
- Login to the OCI console, navigate to the VCN & select the VCN which you have used during Instance creation.
- Go to the VCN details page, & click on the Public Subnet which belongs to the Instance.
Image may be NSFW.
Clik here to view.
3. This Subnet should have the Route Table associated with it and that Route Table should have a connection to the Internet Gateway.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
If you created the VCN without Related Resources, then you have to manually create the Internet Gateway & the Route Table.
Steps to Create Internet Gateway & Add Route Rule:
- Click on the VCN, then under Resources click on the Internet Gateway.
- Create an Internet Gateway and fill all the required details.
Image may be NSFW.
Clik here to view.![Internet Gateway in OCI]()
3. Click on the Route Table from the left Submenu.
4. Click on the Default Route Table and add the Route Rules.
5. Enter the required fields (Target type, Destination CIDR Block, Compartment, Target IGW).
Image may be NSFW.
Clik here to view.![Create IGW]()
Check 3: Port 22 (Linux)/3389 (Windows) Should be Open.
Next step is to check if Port 22 (Linux) & 3389 (for Windows) is opened in the Security List.
Note: Security List is the firewall which allows the connection.
- Under Networking, click on VCN.
- From the left submenu, select the Public Subnet in which you have created the Database or the Compute machine.
- Click on the Security List and then click on the Security List name.
- Under your Security List, add an Ingress rule to open Port 22 (for Linux) & open Port 3389 (for Windows).
Note: If you want to open port 1521, then follow the same process & you can give the source CIDR of your choice, where 0.0.0.0/0 will open for the Public Internet & in the same way you can provide the VCN or Subnet CIDR.
Image may be NSFW.
Clik here to view.![Public Subnet]()
Check 4: Use the Correct SSH Private Keys.
When you try to connect via Putty, it prompts for the Username and afterward shows the “Disconnected No Supported Authentication methods required” error message as shown below. It means there is some issue with the keys you provided.
PUTTY Fatal Error: Disconnected: No supported authentication methods available (server sent: publickey, gssapi-keyex, gssapi-with-mic)
Image may be NSFW.
Clik here to view.
FIX:
If you are getting the above-mentioned issue, it means the Public Key you have added to your Instance is wrong.
Try to create a new Instance & add the new Public Key again.
Or
Check if you have added the Private key under SSH->Auth or not.
Image may be NSFW.
Clik here to view.![SSH authentication]()
Steps for Connecting to a Database/Compute Instance:
There are 3 main ways to network to Oracle Cloud Instance i.e…
- SSH (Secure Shell)
- IPsec VPN (Virtual Private Network)
- FastConnect
Note: Here is a slide from the Connectivity/Security Module of our Cloud Training
Image may be NSFW.
Clik here to view.
Now that you have performed all the Steps for troubleshooting, check whether you can connect to your instance or not.
You can connect to a running Instance using a Secure Shell (SSH) for Linux or Remote Desktop connection for Windows. To connect to a Linux Instance from your Laptop, you can download a FREE SSH client called PuTTY from Here.
Enter the Public IP Address in the Hostname, then add the SSH Private key under SSH & then Auth. Click on Open.
Image may be NSFW.
Clik here to view.
Well, that was all on How to Create & Connect Windows/Linux machine on Oracle Cloud (OCI).
Hope the mentioned troubleshooting steps will help you.
Related/Further Readings
- Create Compute (Linux/Windows Machine) On Oracle Cloud (OCI)
- Oracle Cloud: Create VCN, Subnet, Firewall (Security List), IGW, DRG: Step By Step
- Subnets Are Now Regional (OCI: New Feature)
Begin your journey towards becoming an Oracle Cloud [1Z0-932] Certified Architect by Joining the FREE Masterclass on How To Become Oracle Certified Cloud Architect [1Z0-932] in 8 Weeks, and start preparing today to clear the Oracle Cloud Infrastructure Architect Exam-(1Z0-932) Certification Exam.
Click on the image below to Register for the FREE Masterclass NOW!
Image may be NSFW.
Clik here to view.
FREE Community
Click on the below image to join our FREE Telegram Group.
Image may be NSFW.
Clik here to view.
The post [Troubleshooting] Compute/Database Instance Connectivity Issue in Oracle Cloud (OCI) appeared first on Oracle Trainings.