Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0. Create new instance with SSH keys.
- 1. Stop current instance and go to the 'Boot volume' -> Detach current Boot Volume.
- 3. Go to the Second instance and go to the 'Attach block volunes' and Attach Boot Volume of first instance.
- 4. Connect through SSH, sudo su and run commands from 'iSCSI commands & information' ('Attached Blocked volume').
- 5. Check new Volumes:
- lsblk
- fdisk -l /dev/sdb
- 6. Mount new Volume:
- sudo mount -t ext4 /dev/sdb1 /mnt
- 7. Check mounted volume:
- df -h
- 8. Open /user/.ssh/authorized_keys and update SSH-keys or add new. Save.
- 9. Unmount volume:
- sudo umount /mnt
- 10. Detach iSCSI by runing detach commands from 'iSCSI commands & information' ('Attached Blocked volume').
- 11. exit SSH
- 12. Detach volume in Oracle Instance Details view -> Attached Block Volumes
- 13. Go to the first instance -> 'Boot Volume' and attach again native Volume.
- 14. Start instance.
- 15. Connect via new SSH keys
- PROFIT.
- Reference: https://blogs.oracle.com/cloud-infrastructure/post/recovering-opc-user-ssh-key-on-oracle-cloud-infrastructure
Add Comment
Please, Sign In to add comment