Accessing an Instance Using SSH

You can use SSH to log in to your instance.

Prerequisites

  • The SSH public key must be associated with the instance. See Enabling Secure Access to Instances Using SSH.

  • The SSH private key corresponding to the public key associated with the instance must be available on the host from which you want to SSH to the instance.

  • The IP address of the instance that is in the running state. The IP address must be accessible from your remote host.

Using SSH

Get the IP address of the instance using the following command:

oracle-compute list instance container -Fip,label,state

For example, list the instances in the container /mytenant/public and filter the result for the IP address, instance label, and state:

oracle-compute list instance /mytenant/public -Fip,label,state

In the filtered output, identify the IP address of the instance that you want to log in.

You can log in to your instance as the default root user by using the following command:

ssh root@ip_address -i private_key.