cannot ssh to my new instance of EC2/AWS

0

I am new to AWS up in front. I launched an Ubuntu instance in EC2. I created keypair. Initially I opened TCP/80, TCP/22 from all IP's. For debugging I opened all the ports in the fire wall. When I execute on my desktop machine:

ssh -i "awskeypair3.pem" ubuntu@ec2-xxxxxxxx.us-east-2.compute.amazonaws.com

I get timeout.

ping ec2-xxxxxxxx.us-east-2.compute.amazonaws.com

I get timeout.

I am really not sure what I am doing. So feel free to start at the bottom floor. I am medium familiar with Ubuntu and ssh. But not with AWS.

user2712329

Posted 2019-02-10T07:36:47.577

Reputation: 1

Answers

0

Try check few things:

  • ec2 machine host name / ip. The ip and hostname change if you stopped / started your ec2 instance. This could be misleading at first

  • security group is authorizing inbound connections from all ip on port 22

This in general should do the job. Not sure that icmp ping requests are enabled by default on ec2 instances. You may have to configure that in the security group too.

You can use tcping or telnet to make sure the port is open.

Hichem BOUSSETTA

Posted 2019-02-10T07:36:47.577

Reputation: 101

0

Did you lower the permissions of the pem file with chmod? Check if you're in the same directory as your key when using the above syntax. Also, to be able to ping you also need to open ICMP protocol in security groups.

Anushik

Posted 2019-02-10T07:36:47.577

Reputation: 11