0
votes

In new amazon account I create EC2 free-tier instance I edit inbound & outbound rules correctly for SSH, HTTP & HTTPS. but all ports are closed and I don't have firewall


Here's more information : the instance is : EC2 free-tier instance

Security Group : For Inbound (HTTP(80), SSH(22), HTTPS(443)). For Outbound (All traffic).

Network ACLs : For Inbound (Rule#(100),type(ALL Traffic), Allow). For Outbound (Rule#(100),type(ALL Traffic), Allow).

And the Elastic IPs is associate with the instance. Am sure I using the correct Key Pair.

and I don't have firewall, nothing in my computer bloch SSH traffic to AWS, because I'm using other instance with other account and she's working perfectly !

2
Please provide more details, e.g. did you get the public IP? How you ssh to the server?mootmoot
Yes of course, I used Putty with the Public IP and the private key (.ppk) it's not only the 22 port who is closed but all ports.H.IHYA
ssh Inbound rules should be SSH, TCP, 22, <your_ip_address/32> . If your intranet has a firewall that block you from connect to internet port 22, your connection will fail. Try telnet the port to confirm.mootmoot
my firewall is deactivate, and I have an other instance with other aws account who works fineH.IHYA
Welcome to StackOverflow! Can you provide us more information so that we can assist you? For example: What AMI did you choose when launching the instance? In which VPC did you launch the instance (eg Default VPC)? What makes you think that "ports are closed"? What are your Security Group settings? Thank you.John Rotenstein

2 Answers

0
votes

It appears that your situation is:

  • You have launched an Amazon EC2 Linux instance
  • You are attempting to SSH into the instance
  • It is not connecting

The fact that you are taking advantage of the AWS Free Usage Tier has no impact on your use of AWS. It is merely a billing concept and has zero impact on the resources you create within AWS.

If your SSH attempt takes a while to fail (eg 5+ seconds), this is an indication that no traffic is getting to your instance. Potential causes are:

  • Inadequate rules in the Inbound Security Group (most common)
  • Launching the instance in a Private Subnet (that is, a subnet without a Route Table that points to an Internet Gateway)
  • Network ACLs rules that block traffic (unlikely, since by default they permit all traffic)

If the connection is failing immediately, then potential causes are:

  • Attempting to connect to the wrong instance (do you have the right IP address?)
  • Using an incorrect SSH keypair
  • Connecting with an incorrect username (For Amazon Linux, username is ec2-user. For Ubuntu, username is ubuntu.)
  • Launching the instance without specifying a Key Pair
  • Your own network (eg a corporate network firewall) is blocking output SSH traffic to AWS
  • The instance was not launched with a Linux AMI
0
votes

Here's more information :

the instance is : EC2 free-tier instance

Security Group :
 For Inbound (HTTP(80), SSH(22), HTTPS(443)).
 For Outbound (All traffic).

Network ACLs : 
 For Inbound (Rule#(100),type(ALL Traffic), Allow).
 For Outbound (Rule#(100),type(ALL Traffic), Allow).

And the Elastic IPs is associate with the instance. Am sure I using the correct Key Pair.

and I don't have firewall, nothing in my computer bloch SSH traffic to AWS, because I'm using other instance with other account and she's working perfectly !