Open colwynmyself opened 4 years ago
@colwynmyself Were you able to connect to the EC2 instance using the Private IP ?
@scampuza When I initially created this PR, yeah. I haven't tested it in over a year but I imagine it would still work since the changes are so simple.
@colwynmyself Were you able to connect to the EC2 instance using the Private IP ?
I have instance with Public address (used only for HTTPS connections from the Internet) and Private address (used form ssh into this instance from bastion). When I try to mssh in into this instance from bastion I see mssh is trying to establish connection with external IP.
Just tested this patch with a fresh install and it works fine. It would be really helpful to have this baked in.
Right now there are two ways to SSH to the private ip of an instance rather than the public ip:
-t <instance-id>
argument attachedIt would be great if we could pass in an argument like
--private
tomssh
that would make the resultingssh
command use the private ip without having to go fetch the private ip of the instance.I threw together a quick branch on a fork of the project that supports this, but it doesn't include any tests. https://github.com/aws/aws-ec2-instance-connect-cli/compare/master...colwynmyself:support_private_flag
If you'd like I can look into tidying that up a bit or I could even just open a PR against this project if y'all would like.