NEW Oracle Cloud - accessing your instance from the Oracle Console

ostridge

Guru
Joined
Jan 22, 2015
Messages
1,816
Reaction score
630
I thought it a bit of a chore to start learning and using the console - so this may help.
Scope of this is really for emergencies to fix a broken config.

direct-console-access-to-your-linux-instances-from-the-oci-console

Compute>Instances>Instance details
Scroll down to the Resources navigation on the left side of page
Click on Console connection and then 'Launch Cloud Shell connection' until console appears.
Wait until the console is populated and linked to your instance.


For More tips See Troubleshooting Instances from Instance Console Connections
Scroll down page to 'Troubleshooting Instances from Instance Console Connections'
AND scroll to subheading Linux
Issue the following commands:
Bash:
# Start a bash shell
init=/bin/bash
# From the Bash shell, run the following command to load the SElinux policies to preserve the context of the files you are modifying:
/usr/sbin/load_policy -i
# Run the following command to remount the root partition with read/write permissions:Run the following command to remount the root partition with read/write permissions:
/bin/mount -o remount, rw /
# Edit the configuration files as needed to try to recover the instance.

# To whitelist your router's dynamicIP you may need an FQDN from a DDNS provider;  you can then run
/root/add-fqdn <my-home-router-fq-name> <my-router's-fqdn.domain.tld>

# If you have fixed IP for your home router run
/root/add-ip <myhome-ip-name> <IPaddress>

# After you have finished editing the configuration files, to start the instance from the existing shell, run the following command:
exec /usr/lib/systemd/systemd
# Alternatively, to reboot the instance, run the following command:
/usr/sbin/reboot -f

[HEADING=1]# Exiting the Instance Console Connection[/HEADING]
# When using SSH, the ~ character at the beginning of a new line is used as an escape character.
# To exit the serial console, enter:
~.

# To suspend the SSH session, enter:
~^z
# To see all the SSH escape commands, enter:
~?

Well that should save some reading help a little with navigation of the docs.
 
Last edited:
Well that should save some reading help a little with navigation of the docs.
That's a good write up but it can be really painful to do it that way. I just upload a public key to the server when it is created and use the downloaded private key to access the system. If people try to use the console and set up IncrediblePBX, it won't whitelist their IP address and that can cause more issues.

My personal opinion is to not use console except in an emergency situation when you are locked out. I just take a different approach with the Oracle stuff.
 
f people try to use the console and set up IncrediblePBX, it won't whitelist their IP address and that can cause more issues.
Yes you are correct, but this method is only for the situations when you might have no options left. It is really only to avoid the situation where you need to blow an instance away, because you got the config wrong.
 
I need to archive this somewhere as I'll bet that when the time comes to use it I won't be able to find it. :)
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top