You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: Change SSH User Authentication Key

Announcement
8
Views
0
Comments
edited Aug 9, 2022 5:11PM in Linux

Applies to: 

Oracle Cloud Infrastructure - Version N/A to N/A [Release 1.0]

Linux x86-64 

Goal

Customer inquiries about creating new SSH Keys and adding them to an existing IaaS Compute Instance. 

Solution

Access to your instance using serial console

Once you have connected to your Compute Instance, please refer to the below actions:

Optionally, validate which keys already exist in/home/opc/.ssh/authorized_keysfile:

$ cat /home/opc/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoHtSul0oLdx== rsa-key-ssh
$

Optionally, make a backup of the/home/opc/.ssh/authorized_keysfile:

$ cp -pv /home/opc/.ssh/authorized_keys /home/opc/.ssh/authorized_keys.$(date +"%Y%m%d%H%M%S")
‘/home/opc/.ssh/authorized_keys’ -> ‘/home/opc/.ssh/authorized_keys.20210120144001’
$

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!