Search This Blog

Monday, 15 June 2020

EC2 and security groups

In the previous post we setup an EC2 instance and tried to connect it using SSH:

ssh -i ~/Desktop/test-burner-pair.pem ec2-54-237-224-254.compute-1.amazonaws.com
ssh: connect to host ec2-54-237-224-254.compute-1.amazonaws.com port 22: 
Operation timed out
My host has a public address, the subnet has a gateway that allows connection to internet, so ideally it should have worked. However there is additional setting with EC2 - security groups

A security group acts as a virtual firewall for your instance to control incoming
and outgoing traffic. Inbound rules control the incoming traffic to your instance,
and outbound rules control the outgoing traffic from your instance.
The current security group is
For my SSH to work I need to define a security group inbound rule.
This is basically allowing my laptop to connect to my ec2 host using the security key (my pem file).

1 comment:

  1. Bravo, this phrase came in just the right place! Also visit here: Feeta.pk house for rent in johar town Lahore . Keep up the great writing.

    ReplyDelete