Skip to content

Actually check key type #1107

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

Closed
wants to merge 1 commit into from
Closed

Conversation

jovial
Copy link
Contributor

@jovial jovial commented Jun 21, 2024

Don't assume that users won't lie to you. I actually hit this when following the terraform multinode README. My version of openssh will generate ed25519 keys by default and the example command in the README names this id_rsa[1]. This of course ends up locking you out of the system.

[1] https://github.com/stackhpc/terraform-kayobe-multinode/blob/a3e72a90c8ce835cc2bb4cbda83e79b0c32afdde/README.rst#L73

Don't assume that users won't lie to you. I actually hit this when
following the terraform multinode README. My version of openssh will
generate ed25519 keys by default and the example command in the README
names this id_rsa[1]. This of course ends up locking you out of the
system.

[1] https://github.com/stackhpc/terraform-kayobe-multinode/blob/a3e72a90c8ce835cc2bb4cbda83e79b0c32afdde/README.rst#L73
when: ansible_facts.os_family == 'RedHat'
- when: ansible_facts.os_family == 'RedHat'
block:
- name: Check type of key using the file command
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose someone could be using an agent, so maybe I can't make the assumption that this path contains the key.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've decided just to document this better in terraform-multinode as I don't think we could catch all cases:

stackhpc/terraform-kayobe-multinode#57

@jovial jovial closed this Jun 24, 2024
@jovial jovial deleted the bugfix/improve-check branch June 24, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant