내용으로 건너뛰기

change my SSH port from 0.0.0.0/0 to specific VPN IP

0

currently my instance security group inbound source is 0.0.0.0/0, I want to change that to a specific VPN IP example 125.25.456.88 of my organization and I want to access the ssh only throught this ip. I changed the source in security group of port 22 to 125.25.456.88/32. But after that I'm getting the issue

Failed to connect to your instance EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 Instance Connect. For more information, see EC2 Instance Connect Prerequisites at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html.

질문됨 일 년 전188회 조회
1개 답변
0

Instead of your own public IP address, you'll need to allow SSH traffic from the managed prefix list com.amazonaws.REGION.ec2-instance-connect (with "REGION" replaced with the region code). If you're configuring the security group rule via the console, simply add a new inbound rule with TCP as the protocol, 22 as the port, and the name of the prefix list as the source. This is explained in the document you linked to, under the "Allow inbound SSH traffic" heading: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html#ec2-instance-connect-setup-security-group

The rule that allows SSH access from your own /32 IP address you should delete.

전문가
답변함 일 년 전
전문가
검토됨 일 년 전

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

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

관련 콘텐츠