Connection Refused to Aws Instance

Connection Refused to Aws Instance

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

1

1 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.