OCI: Change SSH User Authentication Key
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 OCI 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_keys
file:
$ cat /home/opc/.ssh/authorized_keys ssh-rsa AAAAB3NzaC1yXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoHtSul0oLdx== rsa-key-ssh $
- Optionally, make a backup of the
/home/opc/.ssh/authorized_keys
file:
$ 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’ $
Tagged:
0