Issue
Try to learn AWS services I setup my own VPC with ipV4/v6. Subnet and Security groups setup too (HTTP/S + SSH open on v4/v6)
When I try to ssh -vvv -i myKey.pem [email protected]
I got :
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug2: resolving "ec2-35-157-94-119.eu-central-1.compute.amazonaws.com" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to ec2-35-157-94-119.eu-central-1.compute.amazonaws.com [35.157.94.119] port 22.
debug1: connect to address 35.157.94.119 port 22: Operation timed out
ssh: connect to host ec2-35-157-94-119.eu-central-1.compute.amazonaws.com port 22: Operation timed out
If try to aws ec2 describe-instances --instance-ids i-09e2830xxxxxx
or with the dashboard I can see my instance up and running with Private and Public IPv4/v6
present and a Public DNS
Any idea why ?
Solution
Make sure you did the following:
Create an IGW (Internet Gateway) and associate it with your VPC;
Add a route for
0.0.0.0/0
to go through the IGW;Associate the subnet (the one you launched your EC2) with the correct routing table (the one containing
0.0.0.0/0 -> IGW
);
Answered By - jweyrich Answer Checked By - Senaida (WPSolving Volunteer)