tom
tom

Reputation: 1077

AWS instance timeout issue

[Updated with system log] I had an AWS EC2 instance that was working until I downgraded the instance type. I reverted it but it still doesn't work. When I try to ssh in, I keep getting a 'connection timed out' error on port 22.

I've read several other people experiencing the same issue, but I've checked my security groups and internet gateway settings. Everything seems to be fine (attached as screenshots).

I've tried using different connections, including a tether from my phone. The instance has an elastic IP. I can also connect to other instances from the same connection.

I'm new to AWS, and I appreciate any help you can give. Please let me know if I can offer any other information. Thank you

enter image description here

enter image description here

enter image description here

Upvotes: 0

Views: 127

Answers (1)

tom
tom

Reputation: 1077

I ended up getting AWS developer support and they told me there was some firewall issue. I added this to the user data of the instance (stopped the instance, clicked actions, and edit user data). Then pasted this:

Content-Type: multipart/mixed; boundary="//"
MIME-Version: 1.0
--//
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
cloud_final_modules:
- [scripts-user, always]
--//
Content-Type: text/x-shellscript; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="userdata.txt"
#!/bin/bash
sudo ufw status
sudo ufw disable
sudo ufw status
iptables -F
ip6tables -F
iptables -L
ip6tables -L
sudo service sshd status
sudo service sshd start
--//

Upvotes: 1

Related Questions