Skip to content

Instantly share code, notes, and snippets.

@erwanosouf
Created August 4, 2022 16:11
Show Gist options
  • Save erwanosouf/b371854a61506f79236b3eae5898736f to your computer and use it in GitHub Desktop.
Save erwanosouf/b371854a61506f79236b3eae5898736f to your computer and use it in GitHub Desktop.
OpenSSH Private Key to RSA
# OpenSSH Private Keys have a specific format
# It cannot be read by openssl and gives that error :
# Could not read private key from id_rsa
# I also tried with ssh-keygen
# > ssh-keygen -if id_rsa -m PEM
# That gives
# > do_convert_from_pem: unrecognised raw private key format
# The solution is to use ssh-keygen and to change the passphrase :
ssh-keygen -p -N "" -m pem -f id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment