Log In to a VM Using SSH

Connect from UNIX and UNIX-Like Systems

You can log in to an Oracle-provided Oracle Linux instance as the default user, opc. The opc user has sudo privileges.

You can use SSH to log in to your instance as the default user, opc, by using the following command:

ssh opc@ip_address —i private_key

In this command, ip_address is the public IP address of the instance, and private_key is the full path and name of the file that contains the private key corresponding to the public key associated with the instance that you want to access.

If an error occurs, see Can’t connect to an instance using SSH in Using Oracle Cloud Infrastructure Compute Classic.

When you’re logged in as the default user, opc, use the sudo command to run administrative tasks.

Connect from Windows

You can log in to an Oracle-provided Oracle Linux instance as the default user, opc. The opc user has sudo privileges. If you’re using a Windows host, you can use PuTTY or any other similar client to connect to your instance using SSH.

  1. Run the PuTTY program.

    The PuTTY Configuration window is displayed, showing the Session panel.

  2. In Host Name (or IP address) box, enter the public IP address of your instance.

  3. Confirm that the Connection type option is set to SSH.

  4. In the Category tree, expand Connection if necessary and then click Data.

    The Data panel is displayed.

  5. In Auto-login username box, enter opc.

  6. Confirm that the When username is not specified option is set to Prompt.

  7. In the Category tree, expand SSH and then click Auth.

    The Auth panel is displayed.

  8. 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.

  9. In the Category tree, click Session.

    The Session panel is displayed.

  10. In the Saved Sessions box, enter a name for this connection configuration and click Save.

  11. Click Open to open the connection.

    The PuTTY Configuration window is closed and the PuTTY window is displayed.

  12. 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.

If an error occurs, see Can’t connect to an instance using SSH in Using Oracle Cloud Infrastructure Compute Classic.

When you’re logged in as the default user, opc, use the sudo command to run administrative tasks.