Back to Blog

Connect to server using Console

   Mariusz Antonik    Oracle Cloud (OCI)    2 min read    200 views

I had a problem with server and I need to connect to server using SSH connection

I prepared the keys upload pulic key to console but when tryint to connect I was getting failure:

 

mariusz@mariusz-System-Product-Name:~/.ssh$ ssh -o ProxyCommand='ssh -W %h:%p -p 443 ocid1.instanceconsoleconnection.oc1.iad.anuwcljrqkgrq3ycepunb6o65zfmxd6jx6mfmoihaj6tkrxzeuobhymd4aeq@instance-console.us-ashburn-1.oci.oraclecloud.com' ocid1.instance.oc1.iad.anuwcljrqkgrq3ycin6d42woh4w5cl6l4mftj42szaxuzsej6l3ntn2pwsia=================================================
IMPORTANT: Use a console connection to troubleshoot a malfunctioning instance. For normal operations, you should connect to the instance using a Secure Shell (SSH) or Remote Desktop connection. For steps, see https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/accessinginstance.htmFor more information about troubleshooting your instance using a console connection, see the documentation: https://docs.cloud.oracle.com/en-us/iaas/Content/Compute/References/serialconsole.htm#four
=================================================
Unable to negotiate with UNKNOWN port 65535: no matching host key type found. Their offer: ssh-rsa

 

 

Looks like reason was because we had a missmatch between OCI version of the ssh and my version 

Solution:

ssh \
  -o HostKeyAlgorithms=+ssh-rsa \
  -o PubkeyAcceptedAlgorithms=+ssh-rsa \
  -o ProxyCommand='ssh -W %h:%p -p 443 ocid1.instanceconsoleconnection.oc1.iad.anuwcljrqkgrq3ycepunb6o65zfmxd6jx6mfmoihaj6tkrxzeuobhymd4aeq@instance-console.us-ashburn-1.oci.oraclecloud.com' \
  ocid1.instance.oc1.iad.anuwcljrqkgrq3ycin6d42woh4w5cl6l4mftj42szaxuzsej6l3ntn2pwsia

 

We add specificly ssh-rsa format for this command and now connection was estabilished

 

Tags: #OCI
About the Author
Mariusz Antonik

Oracle Cloud Infrastructure expert and consultant specializing in database management and automation.

All Tags
#Advanced #Bash #bash monitoring #bash scripting #Beginner #Best Practices #Capacity Planning #cpu bottleneck #CPU Monitoring #cpu monitoring linux #cpu trends #cpu usage trends linux #cron jobs #database monitoring #database performance #detect slow queries mysql #disk capacity planning server #disk forecasting linux #Disk Monitoring #disk usage #disk usage script linux #disk usage trends #Early Detection #easy infrastructure monitoring #free-tier #Guide #Health Reporting #historical server monitoring #infrastructure #infrastructure health #infrastructure health dashboard #infrastructure health reporting #infrastructure monitoring #infrastructure monitoring report #infrastructure trends monitoring #lightweight monitoring #linux cpu usage #linux disk capacity planning #linux disk usage #Linux monitoring #linux monitoring tools #linux performance #linux performance monitoring #linux server #linux server monitoring #linux servers #linux tools #low maintenance monitoring #monitor cpu usage over time linux #monitor server trends #MySQL #mysql health reporting #MySQL monitoring #mysql optimization #MySQL Performance #mysql performance monitoring #mysql query performance issues #mysql server monitoring #mysql slow query analysis #mysql slow query monitoring #mysql trends #networking #OCI #oracle-cloud #Performance Degradation #performance monitoring #performance trend monitoring #plan disk growth server #practical server monitoring #predict disk usage growth #query optimization #Security #server health #server health reporting #server health weekly report #server monitoring #server trend analysis #server-trends #simple monitoring system #simple ops monitoring #slow queries #slow query reporting mysql #small business infrastructure #small business IT #small infrastructure monitoring #small server monitoring #storage capacity planning linux #storage monitoring #subnets #system health reporting #Trend Monitoring #Tutorial #vcn