ssh-keygen 和 openssl 提供了两个不同的 public 密钥

ssh-keygen and openssl gives two different public keys

ssh-keygen 和 openssl 是否可以从同一个私钥生成两个不同的 public 密钥?命令 ssh-keygen -y -f ./my.key 给出(同一行 ssh-rsa 之后的内容)与命令 openssl rsa -in my.key -pubout

相同的密钥,但表示形式不同。 OpenSSL 在 ASN.1 中使用 X.509 SubjectPublicKeyInfo,通常(包括此处)包装在 PEM 中; OpenSSH('rsa1' SSHv1 的密钥除外,它已损坏,您不应该使用)使用类似 XDR 的 SSH 有线格式,采用 base64。

欺骗或近乎欺骗:
Convert pem key to ssh-rsa format
RSA Public Key format
Convert RSA public key to RSA DER
Converting an OpenSSL generated RSA public key to OpenSSH format (PHP)

How to store/retrieve RSA public/private key(埋在中间)
和不太明显的交叉堆栈 https://security.stackexchange.com/questions/42268/how-do-i-get-the-rsa-bit-length-with-the-pubkey-and-openssl