OpenSSH key pem和SSH2 key格式互转 - Bright's Blog - CSDN博客

“RFC4716” (RFC 4716/SSH2 public or private key)

“PKCS8” (PEM PKCS8 public key)

 

ubuntu:

ssh-keygen -e -f ~/.ssh/id_rsa.pub > ~/.ssh/id_rsa_pub.pem

ssh-keygen  -f ~/.ssh/id_rsa_pub.pem -i -m RFC4716 > ~/.ssh/id_rsa.pub

来源: OpenSSH key pem和SSH2 key格式互转 - Bright's Blog - CSDN博客