use openssl create RSA public/private key

First. Entry openssl command
openssl
Second. Create private key
genrsa -out rsa_private_key.pem 1024
Third. Create public key base on private key
rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem