Skip to content

SSH metadata doesn't match the IMDS format #234

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

Open
arianvp opened this issue Feb 17, 2025 · 4 comments
Open

SSH metadata doesn't match the IMDS format #234

arianvp opened this issue Feb 17, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@arianvp
Copy link

arianvp commented Feb 17, 2025

Describe the bug

The mock server returns SSH keys in a different format than EC2 IMDS.

e.g.

http://169.254.169.254/latest/meta-data/public-keys/

returns

0=mykey

on EC2 whilst this project returns

0/

Which means that the ec2-metadata tool that ships with Amazon Linux 2 chokes on the output:

ec2-metadata --public-keys

garblles output:

$ ec2-metadata --public-keys
public-keys: 
keyname:0/
index:0/
format:public-keys/
key:(begins from next line)


Steps to reproduce

$ sudo ip addr add 169.254.169.254 dev enp0s1
$ sudo  ec2-metadata-mock  --hostname 169.254.169.254 --port 80
$ ec2-metadata --public-keys
public-keys: 
keyname:0/
index:0/
format:public-keys/
key:(begins from next line)

Expected outcome

$ ec2-metadata --public-keys
public-keys: 
keyname:framework
index:0
format:openssh-key
key:(begins from next line)
ssh-ed25519 XXXXXXXX framework

Application Logs
The log output when experiencing the issue.

Environment

  • AEMM Version: v1.12.0
  • OS/Arch: Amazon Linux 2
  • Installation method:
@arianvp arianvp added the bug Something isn't working label Feb 17, 2025
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want this issue to never become stale, please ask a maintainer to apply the "stalebot-ignore" label.

@github-actions github-actions bot added the stale Issues / PRs with no activity label Mar 19, 2025
@arianvp
Copy link
Author

arianvp commented Mar 19, 2025

Not stale. Can somebody at least react on an issue before stale-botting it?

@github-actions github-actions bot removed the stale Issues / PRs with no activity label Mar 20, 2025
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want this issue to never become stale, please ask a maintainer to apply the "stalebot-ignore" label.

@github-actions github-actions bot added the stale Issues / PRs with no activity label Apr 20, 2025
@arianvp
Copy link
Author

arianvp commented Apr 20, 2025

Still not stale. Can anybody react?

@github-actions github-actions bot removed the stale Issues / PRs with no activity label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant