Ama*_*rus 245 encryption ssh private-key public-key
假设我有一个 SSH 密钥,但我删除了公钥部分。我有私钥部分。有什么方法可以重新生成公钥部分吗?
Kyl*_*ndt 290
使用 ssh-keygen 的 -y 选项:
ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub
Run Code Online (Sandbox Code Playgroud)
来自'man ssh-keygen'
-y This option will read a private OpenSSH format file and print an
OpenSSH public key to stdout.
Run Code Online (Sandbox Code Playgroud)
使用 -f 选项指定私钥,您的私钥可能是 dsa 而不是 rsa。您的私钥的名称可能包含您使用的名称。新生成的公钥应该和你之前生成的一样。
小智 6
解决方案专门针对使用 Windows 的用户
使用的工具:
执行步骤:
*.ppk文件)。显示 Puttygen 部分要聚焦的快照:
| 归档时间: |
|
| 查看次数: |
111878 次 |
| 最近记录: |