Allow `id_ed25519.pub` key file to be found as default SSH key
marianschmidt opened this issue · comments
RStudio has changed the default generated SSH key to ED25519, which means that also the key file name changed and cannot be found by the default internal cyphr
function openssl_find_pubkey
. I would suggest to:
- add
id_ed25519.pub
to the default algorithm to find keys inside the~\.ssh
folder OR - allow custom key names
Thanks for reporting this:
For custom key names, you can set the environment variable USER_KEY
to ~/.ssh/id_ed25519
and similarly USER_PUBKEY
to ~/.ssh/id_ed25519.pub
(for example) as an immediate workaround.
If id_ed25519
looks like being a common filename, then Cyphr could additionally look for that, as well as id_rsa.
@weshinsley Thanks for your reply and for working on an implementation on new key types. I have just tried the workaround using the USER_KEY
environment variables. This workaround fails for me during the step cyphr::data_admin_authorise
(User used an ED25519 key. Admin uses RSA key.) with the following error message:
cyphr::data_admin_authorise(data_dir, yes = TRUE, path_user = ssh_admin_dir)
Error in openssl::rsa_encrypt(sym$key(), dat$pub) :
check failed: (inherits(pk, "rsa"))
Or is it a problem if the same user name requests access from different hosts?
Maybe this is also relevant for your new feature implementation.
This needs a change in the openssl package, to be able to encrypt the symmetric key with the different key... Still working on it...