This post covers, the Issue & Fix faced by our trainee in our [1Z0-932] Oracle Cloud Infrastructure Architect training where after creating a Linux Machine, the trainee was unable to connect from Laptop/Desktop using Putty on SSH (Port 22).
Note: When you configure Compute Instance on IaaS/OCI or on PaaS – Database Cloud Service (DBCS) for Database as a Service (DBaaS), you get dedicated machine with full Unix access including root (connect as OPC user and then sudo to root)
One of our trainees has created Instance on cloud and after that, he was trying to connect to the instance via Putty (SSH) but was getting below error message.
PUTTY Fatal Error:
Disconnected: No supported authentication methods available (server sent: publickey, gssapi-keyex, gssapi-with-mic
Connecting to Oracle Cloud
There are 3 main ways to network to Oracle Cloud Instance i.e…
Note: Here is a slide from the Connectivity/Security Module of our Cloud Training
For SSH Connection from your laptop/desktop to Oracle Cloud Machine, you need Public IP of your Instance and you can get that IP by clicking on the instance and it will show the details of the instance as shown below:
Cause: SSH Connectivity Issue
There could be 3 cause of this issue:
- Your SSH port 22 is not open from the internet in Cloud Firewall
- SSH Public key you generated was not generated or not uploaded properly while creating the instance (or you are not using Private Key Properly in Putty).
- You have forgotten to add the Private key under SSH->Auth
- It could be a typo issue for username
How to Check if SSH Port 22 is Open
In order to find if SSH port 22 is open on Cloud from the Internet, use telnet from the machine you are connecting
telnet <public IP of Machine> 22
If the port is open you should see output like
Connected to .188.8.131.52
Escape character is ‘^]’.
In our case port, 22 was not open across Firewall on Cloud
1. For first cause mentioned above, make sure you have opened the SSH port 22. Also, make sure you have created the Internet Gateway & associated the Route table with it. To open the SSH Port 22, create a Stateful Ingress Security Rule to allow ssh port as shown below.
We cover Step by step method to open SSH Port and other connection details in all our Cloud training’s [1Z0-932] Oracle Cloud Infrastructure Architect, EBS (R12) on Oracle Cloud (OCI), or Oracle Database Cloud Service (Cloud DBA)
2. For the Second Cause:
Make Sure when you copy the content of your Public key file, the Whole content is copied, if you miss a single letter it will give an error.
Try to avoid save and browse the public key file from the saved location. Instead of this copy-paste key while creating an instance.
3. For the Third Cause:
Make sure, Add the Private key path in the Auth tab, & then try to connect it again.
4. Make sure when you giving the username while login, enter the correct name of the user (OPC)
If you have any doubt, then post your doubts in the comment section.
- Download Step by Step Activity Guide to Register for Oracle Cloud Trial Account
- FREE Masterclass on How To Become Oracle Certified Cloud Architect
- Oracle Cloud Infrastructure (OCI) Architect (1z0-932)Live Training
Next Task For You
If you want to take your career to next level by becoming Oracle Certified Cloud Architect even if you are a beginner then I would like to invite you to Join my FREE Masterclass on How To Become Oracle Certified Cloud Architect [1Z0-932] in 8 Weeks. Click on the image below to register for FREE