EC2 Instance Connect SSH source IP

0

Hi All, Im working with my first EC2 instance and im going around the details of security groups. The default security group that i have includes an allow all (0.0.0.0/0) inbound ssh (tcp-22). When I establish an ssh connexion via the EC2 instance connect method (directly from the management console) I see that the source ip is an aws ip ... public ip (i check by doing a who). Do you know what is this ip? is it the cloudshell from my management console?

thanks in advance!

질문됨 2년 전2602회 조회
2개 답변
1

For Amazon EC2 console browser-based client, the IP is from the EC2 Instance Connect IP address range. You can validate this from the AWS IP address ranges JSON file and look for EC2_INSTANCE_CONNECT for your region. Example for us-east-1, the range is:

{
  "ip_prefix": "18.206.107.24/29",
  "region": "us-east-1",
  "service": "EC2_INSTANCE_CONNECT",
  "network_border_group": "us-east-1"
}

More details here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html#ec2-instance-connect-setup-security-group

profile picture
joahna
답변함 2년 전
1

To add to the above, check out this link would help you understand how: Using Amazon EC2 Instance Connect for SSH access to your EC2 Instances You could check the detail of the ec2-instance-connect RPM package for further.

Now:

  1. Do a quick what is my IP to see the public IP that you're using to access AWS services.
  2. upon connecting via EC2 instance connect, check out your cloudtrail log - look under event source "SendSSHPublicKey" (for details on when the SSH public keys are pushed to the instance); dig through the event record and you will see your IP in (1)

I hope that help

profile pictureAWS
Jules_N
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠