Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

How to generate RSA private key and public key with openssl

openssl genrsa -out private_key.pem 2048
#where private_key.pem == key file name
#2048 == bit size of the key

#To view the private key
cat private_key.pem

# To generate public key from the private key
openssl rsa -in private_key.pem -outform PEM -pubout -out public_key.pem
 
PREVIOUS NEXT
Tagged: #How #generate #RSA #private #key #public #key #openssl
ADD COMMENT
Topic
Name
3+1 =