OCI - Unable to SSH into Instance with Error "connect to host x.x.x.x port 22: Connection refused"
in Linux
Applies to:
Oracle Cloud Infrastructure
Linux x86-64
Symptoms:
Unable to login to OCI instance and attempts fail with error:
ssh: connect to host x.x.x.x
port 22: Connection refused
Cause:
It is possible the OpenSSH service did not start which will result in the SSH connection refused error, so verify the status of the OpenSSH service startup via serial console.
There are multiple reasons why OpenSSH service fails to start, below are a few common issues:
· The /etc/ssh/sshd_config file has incorrect SE Linux context set.
· The /etc/ssh/ directory or the files under it have wrong permissions.
Tagged:
0