0% found this document useful (0 votes)
81 views5 pages

Recovering OPC User SSH Key

Recovering OPC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views5 pages

Recovering OPC User SSH Key

Recovering OPC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Recovering OPC User SSH Key

Scope Binnacle
The purpose of the following process is to indicate the steps that must be followed to
Team Modified Step(s)
Recover opc user SSH Key on Oracle Cloud Infrastructure.
Created By: None

• Stop the instance that you can't log in to.


Francisco Responsible for the
• Detach the boot volume.
Bohorquez modification
• Attach the boot volume to a running instance with a different OS than the
instance that you can't log in to. None
Version:
• Run the iSCSI commands to attach the device and make it visible to the local
operating system. Approval of the
Beta
• Fix the authorized_keys file. Change
• Unmount the device and detach it by running the iSCSI commands.
Approved by:
• Attach the boot volume to the original instance and start it.

Steps

Stop the instance that you can’t connect to. In the


Oracle Cloud Infrastructure Console, go to the details
1
page for the instance and click Stop. More details in
"the public documentation".
Detach the boot volume. In the Boot Volume section,
click the Actions icon and choose Detach. See
2
"Detaching a Boot Volume" for additional details if
needed.

Attach the boot volume to another Linux instance by


going to the details page of a different VM,
clicking Attach Block Volume, and then selecting the
3 boot volume that you just detached in the previous
step. Be sure to select Read/Write access. For
additional details see "Attaching a Boot Volume"
option available in the public documentation portal.
After the boot volume attachment is completed (the
BV icon is green), connect through SSH in the
4
running VM and run the iSCSI commands to make
that new disk available and visible by the OS.

Use the sudo lvdisplay command in order to know


5
your boot-volume name LV Path
Make the name volume point 5 (LV Path), which is
the root (/) partition where you can recover the opc
6 SSH key file, available to the local operating system sudo mount -o nouuid / LV Path /mnt
using "mount" command. Be sure to use the -o nouuid
option
Fix the opc SSH key by editing the
7 /mnt/home/opc/.ssh/authorized_keys file and adding sudo vi /mnt/home/opc/.ssh/authorized_keys
your SSH key public file.
After you add or change the SSH public key you need
8 sudo umount /mnt
to use, save and exit it.

Detach the iSCSI boot volume by running the detach


9
iSCSI commands

Ensure that the /dev/sdb disk is no longer available or


10 visible through the SSH connection, and then detach
it.
Reattach the boot volume to the instance where you
11 wanted to recover the SSH key, wait for it to become
operational (green icon) and start it.

Learn more: https://www.atlassian.com/team-playbook/plays/project-poster

Copyright © 2016 Atlassian

This work is licensed under a Creative Commons Attribution-Non Commercial-Share Alike 4.0 International License.

You might also like