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
Procedure
- 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.
- Click the Network tab and then click the SSH Public Keys tab in the left pane.
- The SSH Public Keys page is displayed.
- Click Add SSH Public Key.
- 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:
- To enable the key, select the Enabled check box. Alternatively, you can deselect the check box and enable the key later.
- Click Add.
After adding an SSH public key, you can attach it to an instance when you create the instance.
You must attach an SSH key to an instance when you create the instance. You’ll use this SSH key to access your instance later on, when your instance is running.
Source: http://docs.oracle.com/cloud/latest/stcomputecs/STCSG/GUID-65AA23D4-5F57-4EF6-9704-C8E16932C0AD.htm#OCSUG233