Your UX is waiting ...interact, engage, explore in Las Vegas at CloudWorld 2023

Learn more
OCI: SSH to Instance Failed at "Connection refused" — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: SSH to Instance Failed at "Connection refused"

edited Aug 9, 2022 4:44PM in Linux

Applies to: 

Oracle Cloud Infrastructure

Linux x86_64


When ssh to an instance, it fails with "Connection refused" as follows:

OpenSSH_7.1p2, OpenSSL 1.0.1g 7 Apr 2014
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ****.****.****.**** [****.****.****.****] port 22.
debug1: connect to address ****.****.****.**** port 22: Connection refused
ssh: connect to host ****.****.****.**** port 22: Connection refused


There are many reasons for the error like sshd service is not running or sshd wrong configuration or sshd permission issue etc, 

so you have to check them step by step. 

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!