This article covers methods to resolve "Connection refused" or "Connection timed out" errors which is noticed when trying to connect to my Amazon EC2 instance using SSH. In fact, this error indicates that the server didn't respond to the client and the client program gave up (timed out).
Common causes for "Connection refused" or "Connection timed out" EC2 AWS errors:
- The security group or network ACL doesn't allow access.
- There is a firewall on the instance's operating system.
- There is a firewall between the client and the server.
- The host doesn't exist.