aws / aws-ec2-instance-connect-cli

This is an all-in-one client for EC2 Instance Connect that handles key brokerage and establishing connection to EC2 Instances through an interface near-identical to standard system ssh, sftp, and other utilities.
Apache License 2.0
159 stars 42 forks source link

is there a way not to use the instance ID? #8

Open mrpackethead opened 5 years ago

mrpackethead commented 5 years ago

Is there a way you can use mssh without the instance id? can the instance id be swapped out for something more freindly?

./bin/mssh ec2-user@ec2-54-245-189-134.us-west-2.compute.amazonaws.com -pr dev -t i-0b01816d5c99826d8 -z us-west-2

LordAlfredo commented 5 years ago

Thank you for the feedback. We recognize that needing to specify the instance ID is a pain point compared to native ssh (as is needing to specify the availability zone). We are taking this request into our consideration for how to improve the experience going forward.

dko-slapdash commented 2 years ago

I think that having instance id and region is required to push the public key to AWS.

I have one work-around in mind: if an instance has a public DNS name, we could've had a DNS TXT record for it in form of region instance_id - and then, mssh could've checked for that TXT record to obtain the real region and instance id.

If it was implemented, then we could've do mssh user@public.instance.host.com, exactly the same way as vanilla ssh does.