Certificate type is set to ssh-rsa-cert-v01@openssh.com which is deprecated in new openssh
tierpod opened this issue · 5 comments
Hello. It's not a problem with signmykey, but with x/crypto/ssh library. When local signer is used, ssh certificate type is set to ssh-rsa-cert-v01@openssh.com
which is deprecated in new openssh versions.
I found some similar issues. As I understood, this library will be updated to set valid type:
but for now, there are a couple of workarounds:
- Add
PubkeyAcceptedKeyTypes +ssh-rsa-cert-v01@openssh.com
to ~/.ssh/config - Use different ssh key type:
ssh-keygen -t ed25519
Hello @tierpod,
Thanks for reporting this issue. I just hit the same problem on my laptop after upgrading Ubuntu to 22.04. My signmykey server is using Vault as a Signer backend and, like described in the Vault issue you linked, the certificate type is set to ssh-rsa-cert-v01@openssh.com
too with my RSA key.
For the moment signmykey defaults to ~/.ssh/id_rsa.pub
to get and sign the public key of the user. I'm thinking about searching for more "common" paths (~/.ssh/id_ecdsa
and ~/.ssh/id_ed25519
) and sign all keys found. It keeps the backward compatibility and at the same time allow using signmykey with new key types without explicitly configuring it in the config.
What are your thoughts about it ?
Actually it makes sense, according to man ssh
:
-i identity_file
... The default is ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk, ~/.ssh/id_ed25519, ~/.ssh/id_ed25519_sk and ~/.ssh/id_rsa.
If key
is not set, we can search these files and sign all keys found.
Do you want me to investigate this and suggest PR? At first sight, it may take some time, because we have to deal with list of keys instead of one.
Ok great, yes I'll happily let you submit a PR on this if you have time, and we will iterate on it since it will need many changes I think :)
And feel free to rework complete functions and remove unnecessary code if needed.
Hi @tierpod,
I just released v0.7.0 of signmykey with your PRs. So now we have support for multiple keys by default and warning message for the end user when they receive a certificate signed with a deprecated algorithm. Thanks again for your contribution :)
I keep this one open to keep track of the issue of the generated certificate type by signmykey signer. The specific issue on Go x/crypto/ssh seems to be here: golang/go#36261