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 policy  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. For reference material about 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:

  • 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 Linux instances: The full path to the key pair that you used when you launched the instance. For information about how to generate key pairs, see Managing Key Pairs on Linux Instances.
  • 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