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

updated ssh alg from RSA keys to Ed25519 #571

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mkadsv
Copy link

@mkadsv mkadsv commented Nov 5, 2021

Github is dropping RSA keys and enforcing ED25519.
See Github SSH Key Docs

Any users that just created an SSH key (Nov 3, 2021 or later)will run into a permissions error.

RSA keys (ssh-rsa) with a valid_after before November 2, 2021 may continue to use any signature algorithm. RSA keys generated after that date must use a SHA-2 signature algorithm. Some older clients may need to be upgraded in order to use SHA-2 signatures.

@markshust
Copy link
Owner

Thanks for the info. Are the new keys default-named to id_ed25519? I would think the name id_rsa may still be kept for posterity purposes.

If we were to switch this (or add it in), we'd want to still keep the old one there as well so we don't break the setup for existing users.

@mkadsv
Copy link
Author

mkadsv commented Nov 5, 2021

If you create new ssh keys in Github the default name is id_ed25519.

To your point about existing users, instead of updating the yaml, maybe a simple comment like If you recently updated your Github SSH Key after Nov 2, 2021, change the yaml... during the Manual Setup Guide for the clone step might be the quickest solution for now:
# bin/cli git clone [email protected]:magento/magento2.git .

@markshust
Copy link
Owner

Thank you very much, I confirmed that is indeed the name of the SSH key.

Let me test to see if things still work and there are no weird errors if I add both to the configuration. I'd like to test to see if it still works with an older key present and not a new one, and vice versa. If everything works, I think we can have both entries there for the time being until GitHub nixes RSA's (which will set the standard for everyone moving forward to use the new encryption type).

More info at https://stefanbauer.me/articles/update-your-ssh-keys-to-ed25519

I'll keep this open while I do some additional testing.

@markshust markshust added WTD and removed WTD labels Dec 4, 2022
@what-the-diff
Copy link

what-the-diff bot commented Dec 4, 2022

  • The file docker-compose.yml was changed
  • In the appvolumes section, id_rsa key is replaced with id_ed25519 key

@h3xx
Copy link
Contributor

h3xx commented Jan 24, 2023

I've noticed some issues with even adding this mapping without testing first:

If the ~/.ssh/id_rsa file doesn't exist before running docker-compose, it'll create a directory with the path ~/.ssh/id_rsa/

The startup scripts really should test the file existence before mapping it as a volume, but they don't.

I feel the second-best solution is for the startup scripts to test for existence of each ~/.ssh/id_rsa and ~/.ssh/id_ed25519 and map any and all available.

Maybe I'm just complaining, but mapping the SSH key file seems like an incomplete solution [does not connect to SSH auth agent; does not account for servers having their own configs in ~/.ssh/config; does not account for git's credential.<URL> configs; cannot use PAM modules; doesn't use ~/.netrc]

...to a problem that doesn't really exist [unable to authenticate composer installs].

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

Successfully merging this pull request may close these issues.

3 participants