Oracle Cloud Infrastructure Documentation

Connecting to an Instance

You can connect to a running instance by using a Secure Shell (SSH) or Remote Desktop connection. Most UNIX-style systems include an SSH client by default. To connect to a Linux instance from a Windows system, you can download a free SSH client called PuTTY from

Required IAM Policy

To connect to a running instance with SSH, you don't need an IAM An IAM document that specifies who has what type of access to your resources. It is used in different ways: to mean an individual statement written in the policy language; to mean a collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it); and to mean the overall body of policies your organization uses to control access to resources. to grant you access. However, to SSH you need the public IP address of the instance (see Prerequisites below). If there's a policy that lets you launch an instance, that policy probably also lets you get the instance's IP address. The simplest policy that does both is listed in Let users launch Compute instances.

For administrators: Here's a more restrictive policy that lets the specified group get the IP address of existing instances and use power actions on the instances (e.g., stop, start, etc.), but not launch or terminate instances. The policy assumes the instances and the cloud network are together in a single compartment (XYZ):

Allow group InstanceUsers to read virtual-network-family in compartment XYZ

Allow group InstanceUsers to use instance-family in compartment XYZ

If you're new to policies, see Getting Started with Policies and Common Policies. If you want to dig deeper into writing policies for instances, cloud networks, or other Core Services API resources, see Details for the Core Services.


You'll need the following information to connect to the instance:

  • For Linux instances: The full path to the key pair that you used when you launched the instance. For information about generating key pairs, see Managing Key Pairs on Linux Instances.
  • The default user name for the instance. If you used an Oracle-provided Linux, CentOS, or Windows image to launch the instance, the user name is opc. If you used the Ubuntu image to launch the instance, the user name is ubuntu.
  • The public IP address of the instance. You can get the address from the Instance Details page in the Console. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances. Then, select your instance. Alternatively, you can use the Core Services API ListVnicAttachments and GetVnic operations.
  • For Windows instances: If you're connecting to the instance for the first time, you will need the initial password for the instance. You can get the password from the Instance Details page in the Console.
Connecting to a Linux Instance
Connecting to a Windows Instance