Troubleshooting Oracle Cloud Compute Instance Serial Console Access via Local SSH

This post walks through resolving a common issue when connecting to the Oracle Cloud Compute Instance serial console using SSH on macOS or Linux.

1. Review the Oracle Documentation

Start by reading the official guide on connecting to the serial console. This article specifically focuses on the section: Using an SSH client on macOS or Linux.

2. Create a Serial Console Connection

In the Oracle Cloud Console:

  • Navigate to Compute > Instances.
  • Select an instance.
  • Under Instance Details, go to OS Management > Console Connection.
  • Click Create Local Connection.
  • Follow the wizard to either generate a new SSH key pair or use your existing public key.

3. Get the SSH Command

Once the connection status shows Active, click the three-dot menu on the right side of the console connection.

  • Select Copy serial console connection for Linux/macOS.
  • You’ll get an SSH command that looks like this:
ssh -o ProxyCommand='ssh -W %h:%p -p 443 something-of-your-own-information@example-of-yourown.domain.tld' example-of-yourown.domain.tld.somethingofyourown

4. Try Connecting (Expect an Error)

Paste the command into your terminal. You may encounter an error like:

Unable to negotiate with UNKNOWN port 65535: no matching host key type found. Their offer: ssh-rsa

5. Fix the SSH Key Algorithm Compatibility

To fix the error, you need to explicitly specify support for the ssh-rsa key type.

Add the following options to both the outer ssh command and the one inside the ProxyCommand:

-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa

A full working example would look like this:

ssh -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa -o ProxyCommand='ssh -oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=+ssh-rsa -W %h:%p -p 443 something-of-your-own-information@example-of-yourown.domain.tld' example-of-yourown.domain.tld.somethingofyourown

6. Success!

You should now be connected to your Oracle Compute Instance’s serial console via SSH.

7. Troubleshooting Key Pair Issues

If you encounter further issues related to your SSH key pair, try generating a new key pair via the Oracle Console and downloading the corresponding private key, rather than using an existing one.

comments powered by Disqus