OpenSSH key pem和SSH2 key格式互转

“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

 

windows:

1)Use the puttyGen

2) Run puttygen and click generate

3) Run your mouse round the blank part for a while.

4) Enter a keyphrase (and repeat)

5) Click save public key and save it \publickey

6) Click save private key and save it \privatekey (extension gets added automatically, this is no good for spoon, but good for putty)

7) Click Conversions->Export OpenSSH key and save as \sshkey.pem

8) In the main window is you key for pasting into OpenSSH authorized_keys file. Copy this in its entirety and past it into your ubuntu machine in /home//.ssh/authorized_keys file.

9) Ok, you can close putty key generator.

10) Utilize the .pem in the tool.


转自太极客


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部