I am trying to connect my AWS instance from my Linux box but getting "ssh: connect to host ec2-18-112-897-24.ap-south-1.compute.amazonaws.com port 22: Connection refused" this error all the times. Can anyone help me with this
11 Answer
Here are some common solutions:
- Make sure your VPC has an internet gateway
- Make sure you update your route table so that 0.0.0.0/0 is routed to the internet gateway
- Make sure your instance has a public or elastic IP address
- Make sure your security group has allowed port 22 from the IP address you want to access the instance from
- Make sure your network access control lists allow appropriate ingress and egress, which is port 22 inbound and ephemeral ports outbound