aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

Allow to pass extra parameters to `aws ec2-instance-connect ssh`

Open lcswillems opened this issue 1 year ago • 2 comments

Describe the feature

Allow to pass extra parameters to aws ec2-instance-connect ssh

Use Case

E.g. I want to start the tunnel in the background.

If I was using the SSH directly, I would do:

ssh -o "StrictHostKeyChecking=accept-new" -f -N -L $DOCKER_TCP_HOSTNAME:/var/run/docker.sock -i $KEY $INSTANCE_USER@$INSTANCE_IP

With aws ec2-instance-connect ssh, it would be great to do:

aws ec2-instance-connect ssh -- -o "StrictHostKeyChecking=accept-new" -f -N -L $DOCKER_TCP_HOSTNAME:/var/run/docker.sock

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

CLI version used

aws-cli/2.17.61 Python/3.12.6 Linux/6.8.0-40-generic exe/x86_64.ubuntu.22

Environment details (OS name and version, etc.)

Ubuntu

lcswillems avatar Sep 28 '24 08:09 lcswillems

Hello @lcswillems, thanks for reaching out! This customization is maintained by an EC2 team, so I'll reach out to them for feedback on this feature request. Also, please mention your use case for the team's understanding. Please let me know if you have any other questions. Thanks!

Ticket # for internal reference : P159335852

adev-code avatar Oct 03 '24 18:10 adev-code

The use case is specified in the issue. Please let me know which details are missing. I gave a concrete example of what I would like to do.

lcswillems avatar Oct 03 '24 20:10 lcswillems

Hey @adev-code, do you know what's the status on this one?

lcswillems avatar Nov 06 '24 16:11 lcswillems

Hello @lcswillems, thanks for getting back. The EC2 team maintaining this customization discussed your feature request, and acknowledged that it would be a beneficial enhancement of the plugin. They have added this feature request to their backlog for tracking. We cannot guarantee if or when the feature would be implemented, but please refer to the AWS CLI changelog for updates going forward (https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst) for updates about this going forward. Meanwhile, you can use your own ssh client as outlined on our public documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-methods.html#ec2-instance-connect-connecting-aws-cli. Please let me know if you have any other questions. Thanks!

adev-code avatar Nov 07 '24 18:11 adev-code

Closing this issue as the appropriate team has backlogged this feature request. As mentioned, please refer to the AWS CLI changelog for updates going forward.

RyanFitzSimmonsAK avatar Feb 18 '25 21:02 RyanFitzSimmonsAK

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Feb 18 '25 21:02 github-actions[bot]