Linux Generate RSA Key

SSH-Key

1
ssh-keygen -b 2048 -t rsa -f id_rsa -P ""

OpenSSL

1
2
3
4
5
6
7
8
# Private Key
openssl genrsa -out private.pem 2048
# Convert Private Key to PKCS8
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private.pem -out private.key


# Public Key
openssl rsa -in private.key -outform PEM -pubout -out public.pem