用puttygen工具把私钥id_rsa转换成公钥id_rsa.ppk

1 前言

有时候需要ppk格式的公钥,可以用putty来处理

2 步骤

1. 产生密钥

可以参考Gitlab的SSH配置(linux和windows双版本)

$ ssh-keygen -t rsa -C [email protected] -b 4096
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Created directory '/c/Users/Administrator/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:nd6QS7KWq1234565vAzG+2VzshgL3KN3Ti7iF8mByQ [email protected]
The key's randomart image is:
+---[RSA 4096]----+
|                 |
|                 |
|         E .  ..o|
|         .oo   ==|
|        N *+   =*|
|         S.+O *o*|
|       .=.+=.%.=.|
|      .o.o+.E.o  |
|      .o..oo.o.  |
+----[SHA256]-----+

2. 使用puttygen转换

保存为id_rsa.ppk,完成。然后拷贝其内容到网上设置SSH公钥中黏贴。

猜你喜欢

转载自www.cnblogs.com/fanbi/p/10069883.html