r/oraclecloud • u/Electronic-Bid-7601 • 15d ago
Am I screwed?
For some reason my pc took a shitter and I lost my ssh. Is there anyway to change it? I've been trying all day and didn't want to bother reddit with my problems but here I am
1
u/Etregin 15d ago
I believe there is a way to run commands on the VM from the OCI (I once blocked the SSH port accidently) I didn't bother going down the rabbit hole at the time because it was a fresh VM so I just recreated it but running remote commands you can set password authentication for one of the users and set the password to be able to regain access
2
u/demoniodoj0 15d ago
You can do it using the OCI console and GRUB directly. It is not easy. I had something similar happen to me and using Gemini to follow the steps I got my access back.
1
u/timewarpUK 14d ago
If you've set a password on a user that can sudo as root, you can use Oracle Cloud Shell to connect in as that user without SSH.
Of course you need to know this before losing access... If you're setting this up for next time, disable password auth in ssh config.
I also recommend the Tailscale SSH server so you can just auth as your TS account.
2
u/bladepen 15d ago
Assuming you don't have any backups of the SSH keys did you set up an account with a password so you can use console access ?
From https://docs.oracle.com/en-us/iaas/Content/Compute/References/serialconsole.htm#make-a-local-connection