Generate Private Key

Generate Key

Private Key

1
ssh-keygen -t rsa

Public Key

1
2
3
4
openssl # enter openssl command 
genrsa -out rsa_private_key.pem 2048 # 生成2048位的私钥
pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM –nocrypt # 把RSA私钥转换成PKCS8格式
rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem # 生成公钥