After I fresh installed Mojave, when I generate a new SSH key it uses the new OpenSSH protocol 2 format private key.

The ID_RSA file starts with "BEGIN OPENSSH PRIVATE KEY", even if I run ssh-keygen -t rsa -C "my@email.com"

According to the ssh-keygen main page, the BEGIN OPENSSH PRIVATE KEY file type is generated by specifying either the -o command line option or creating an ed25519 key type.

How can I create a private key using the old format?

  • If I remember correctly, protocol 2 has been the default since 2014/2015. I know it's the default in El Cap and beyond (and I believe it was in Yosemite as well) - in other words, I don't see this as a Mojave issue. Secondly, rsa1 is version 1 and ed25519 is version 2...Also using `-o' forces the new format...so it seems like you've got a mismatch going on there. – Allan Dec 18 '18 at 0:41
  • Also in the man page: Ed25519 keys always use the new private key format. So, you can't create a ed25519 key with the old format. – Allan Dec 18 '18 at 0:44
  • @Allan Sorry for the delay. I understand. So, is it possible to generate a rsa1 private key in Mojave? I need this kind of key because is the only accepted in MongoDB Compass – they don't accept new format key yet – Hugo Dec 24 '18 at 15:15

You must log in to answer this question.

Browse other questions tagged .