Post

Openssl generate rsa key

Openssl generate rsa key

Whether you’re setting up SSL certificates, configuring SSH key-based auth, or doing code signing, it all starts here. The 2048-bit key is standard minimum for most use cases. The check command at the end is worth running to verify the key isn’t corrupted before you ship it anywhere.

  • Generate private key
1
$ openssl genrsa -out my_private_key.key 2048
  • Generate public key
1
$ openssl rsa -in my_private_key.key -pubout my_public_key.key
  • Check private key
1
$ openssl rsa -in my_private_key.key -check
This post is licensed under CC BY 4.0 by the author.