We can have both Linux and Window compute instance in Oracle cloud. Lets learn about how to login to both the Linux and Window compute instance
Linux Compute Instance
We first need to make sure, we have the public IP associated with the Compute instance and security list allowed to connection to the SSH port 22 on that instance
We have two ways to connect to Linux Compute instance
a. SSH from Window client
b. SSH from linux like client
SSH from window Client
- First create the Linux Compute instance and then allow SSH access to the Compute instance from Internet
- Now generate the SSH key pair using puttygen. Read the below article for generation
how to generate ssh key pair from puttygen.
Important thing to Note: We should copy the public key generated and dont use the save public key button
Now we can use that ssh key pair to login to Compute instance with the putty client
- Now login to Oracle cloud service
i. you can go to http://cloud.oracle.com, click Sign In, and select the Public Cloud Services value for your region from the My Services – Select Data Center dropdown list. Either way you must provide an identity domain, user name, and password to sign in.
ii.Identify your service and click on it
iii. Make a note of the public IP address for the server
iv. Add the public key submit and put the public key obtained in above steps
or if you are creating new compute instance, we can supply the same public key at the same time
- Now lets see How to login to Linux with SSH private key from window client
Run the PuTTY program.
The PuTTY Configuration window is displayed, showing the Session panel.
- Enter the public IP address of your compute instance in the Host Name (or IP address) box,
- Make sure that the Connection type option is set to SSH.
In the Category tree, expand Connection and click Data.
The Data panel is displayed.
In Auto-login username box, enter the username “opc”
In the Category tree, expand SSH and then click Auth.
The Auth panel is displayed.
Click the Browse button next to the Private key file for authentication box. Navigate to and open the private key file that matches the public key that is associated with your instance.
In the Category tree, click Session.
The Session panel is displayed.
In the Saved Sessions box, enter a name for this connection configuration and click Save.
Click Open to open the connection.
The PuTTY Configuration window is closed and the PuTTY window is displayed.
If this is the first time you are connecting to an instance, the PuTTY Security Alert window is displayed, prompting you to confirm the public key. Click Yes to continue connecting.
Terminal window will open.
SSH from Linux Type Client
if You plan to connect it through Linux instance, then generate the keys through ssh-gen
Then again copy the public generated in Oracle compute instance. Now connect to Oracle linux compute instance
ssh opc@ip_address —i private_key
Window Compute Instance
We first need to make sure, we have the public IP associated with the Compute instance and security list allowed to RDP connection on that instance
To enable RDP access
- Open the navigation menu. Under Core Infrastructure, go to Networking and
click Virtual Cloud Networks.
- Click the cloud network you’re interested in.
- Click Security Lists, and then click the security list you’re interested in.
- Click Edit All Rules.
- Under Allow Rules for Ingress, click Add Rule.
- Enter the following for your new rule:
- Source Type: CIDR
- Source CIDR: 0.0.0.0/0
- IP Protocol: RDP (TCP/3389)
- Source Port Range: All
- Destination Port Range: 3389
- When done, click Save Security List Rules.
Now Connecting to Your Windows Instance from a Remote Desktop Client
1. Open the Remote Desktop client.
2. In the Computer field, enter the public IP address of the instance you want to connect to. Your public IP is the instance address you get from the Console.
3. The User name is opc. Depending on the Remote Desktop client you are using, you might have to connect to the instance before you can enter this credential.
4. Click Connect to start the session.
5. Accept the certificate if you are prompted to do so.
6. If you are connecting to the instance for the first time, enter the initial password that was provided to you by Oracle Cloud Infrastructure when you launched the instance. You will be prompted to change the password as soon as you log in. Your new password must be at least 12 characters long and must comply with Microsoft’s password policy. Otherwise, enter the password you created. If you are using a custom image, you may need to know the password for the instance the image was created from.
7. Press Enter.
Hope you like this post on How to Login to compute instance in oracle cloud (Linux/Window). Please do provide the feedback