Go to main content

Using Oracle® Compute Cloud Service - Dedicated Compute Capacity - SPARC Model 300

Exit Print View

Updated: April 2018

Modify an SSH Public Key

Before you make any changes to the ~/.ssh/authorized_keys file of the opc user on an instance, back up the file. You will need this backup if the authorized_keys file gets corrupted, or you inadvertently make changes that result in the opc user getting locked out of the instance. Remember, if there is no other user set up on an instance, and changes to the ~/.ssh/authorized_keys file result in the opc user getting locked out, you might be unable to access your instance.

Note -  To log in to an instance by using SSH, you need to provide the private key that matches a public key associated with the instance.

Complete these steps to backup the authorized_keys file.

  1. Start a second ssh session. This will be your back-up version of the file.

    Ensure that the second ssh session remains connected while you edit the authorized_keys file.

  2. Test the changes you made to the ~/.ssh/authorized_keys file.

    Before closing the backup session, log in with the new or updated SSH key.