How do I SSH into an EC2 instance from AWS gitlab-runner?
When you use public IP the traffic exits your VPC and comes back in, at which point it is no longer identified as coming from that security group.
So you can adjust your ssh connection and use private IP