The following command generates a .pem
certificate (same as the one used by AWS):
openssl genrsa -des3 -out chaveprivada.pem 2048
However, the public and private keys are stored together in the file.
How to extract the public key from the file .pem
?