Adding an SSH Public Key

To access an instance using SSH, generate at least one SSH key pair and upload the SSH public key that should be associated with the instance to Oracle Compute Cloud Service. You’ll use this SSH key to access your instance later on, when your instance is running.

Prerequisites

  • To complete this task, you must have the Compute_Operations role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

  • You must have generated an SSH key pair. See Generating an SSH Key Pair.

Procedure

  1. Sign in to the Oracle Compute Cloud Service console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Network tab and then click the SSH Public Keys tab in the left pane.
    The SSH Public Keys page is displayed.
  3. Click Add SSH Public Key.
  4. Enter or select the following details:
    • Enter a name for the key.

      Choose a name that you can use to identify the key easily.

    • In the Value field, click Select File. Navigate to the path where your SSH key is saved, and select the SSH public key file that you want to add. The value of the SSH key appears in the field.

      Alternatively, you can paste the value of the SSH public key that you want to add.

      Important:

      Paste the key value exactly as it was generated. Don’t append or insert any spaces, characters, or line breaks.

      See the following example:


      Screenshot showing an example of an SSH public key entered in the Value field.

    • To enable the key, select the Enabled check box. Alternatively, you can deselect the check box and enable the key later.

  5. Click Add.

After adding an SSH public key, you can attach it to an instance when you create the instance.