Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2-instance-connect does not support ed_25519_sk keys #212

Closed
2 tasks done
kevcube opened this issue Mar 24, 2022 · 9 comments
Closed
2 tasks done

ec2-instance-connect does not support ed_25519_sk keys #212

kevcube opened this issue Mar 24, 2022 · 9 comments
Assignees
Labels

Comments

@kevcube
Copy link

kevcube commented Mar 24, 2022

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
My SSH key is ed_25519-sk. When using aws ec2-instance-connect send-ssh-public-key I get ...

aws ec2-instance-connect send-ssh-public-key --instance-id i-101010101010 --instance-os-user ec2-user --ssh-public-key file://.ssh/id_ed25519_sk

An error occurred (InvalidArgsException) when calling the SendSSHPublicKey operation: Invalid input parameter received for Illegal argument exception: SSH Public key is invalid
cat ~/.ssh/id_ed25519.pub

sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIFXNjotqNox+MZYb0lsO10gNjZ0q16x5th73vx6vMcrJAAAABHNzaDo=

SDK version number
aws-cli/2.4.28 Python/3.9.10 Darwin/21.4.0 source/arm64 prompt/off

Platform/OS/Hardware/Device
macOS Homebrew arm64 yubikey 5Ci

To Reproduce (observed behavior)
ssh-keygen -t ed25519-sk (requires a FIDO2 device, but one can probably be virtualized.)

Expected behavior
My key gets forwarded

Logs/output
out.txt

Additional context
Add any other context about the problem here.

@tim-finnigan
Copy link

Hi @kevcube thanks for reaching out. As mentioned in this comment from another issue the CLI now supports ED25519 keys. I see from your logs that you are using a recent version of the CLI so you should have the ability to do this. The issue may be with your key generation. I recommend reviewing this documentation and generating another key: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

@tim-finnigan tim-finnigan added response-requested This issue requires a response to continue and removed investigating labels Mar 24, 2022
@kevcube
Copy link
Author

kevcube commented Mar 24, 2022

@tim-finnigan Hey, I've got two keys. One ed25519 that works fine.

One ed25519-sk that doesn't work.

My issue is specifically about the -sk suffix.

@kevcube
Copy link
Author

kevcube commented Mar 24, 2022

Sorry, in one place in the original issue I said my key was ed25519 (no sk)

I've fixed that part of the post.

@github-actions github-actions bot removed the response-requested This issue requires a response to continue label Mar 24, 2022
@tim-finnigan
Copy link

Thanks @kevcube for clarifying. I think this is a feature request then for the EC2 Instance Connect team to support ed25519-sk. I’m going to transfer this issue to our shared SDK repository and reach out to them. I’ll post an update when I hear back.

@tim-finnigan tim-finnigan added feature-request New feature or request and removed guidance Request for help or guidance labels Mar 24, 2022
@tim-finnigan tim-finnigan transferred this issue from aws/aws-cli Mar 24, 2022
@tim-finnigan
Copy link

P61791297

@tim-finnigan
Copy link

The EC2 team said they are tracking this request internally in their backlog so I'm going to close this issue. If you want an update in the future please let me know and I can reach out to the team to see what the status of this request is.

@github-actions
Copy link

This issue is now closed.

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@jbg
Copy link

jbg commented Sep 1, 2022

@tim-finnigan any chance of an update on P61791297? i'm not using ec2-instance-connect but just trying to add a keypair with ed25519-sk format, I assume it's the same missing feature being tracked by that ticket that is preventing it from working.

@tim-finnigan
Copy link

Hi @jbg I did not see any update on that but it is still an open feature request being tracked internally. If you are interested in getting more details going forward I recommend reaching out to AWS Support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants