2 Answers
- Newest
- Most votes
- Most comments
0
Hi
"ssh: connect to host <static-ip-of-instance> port 22: Connection refused" This message comes from a host remotely.
The following are common causes for this error:
The host reached the instance but there was no service listening on the SSH port.
A firewall blocked and was set to reject the package instead of dropping it.
Please Verify the following:
There isn't a firewall blocking the connection.
The SSH service is running on the instance.
The SSH TCP port 22 is in the listening state.
The server's IP address or hostname.
The security group and network ACLs allow incoming traffic on TCP port 22.
please refer to this link for steps on troubleshooting the issue :https://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-resolve-ssh-connection-errors/
answered 2 years ago
0
Here is an article on connection refused error. See if it helps:
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-resolve-ssh-connection-errors/
answered 2 years ago
Relevant content
- asked 3 years ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
Thank you for your suggestions:
Regarding verifying that SSH is actually running on a port is something of a catch22 situation. Unless I login to the machine - I cannot tell if the SSH service is running. Is there another way for me to login to that instance? If so, that would be something to try.