Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 Windows 中创建 SSH 密钥对。我需要以编程方式进行,即不使用 puttygen.exe GUI。请给我方法来完成同样的事情。
-巴拉
在我看来,最好的解决方案是安装Cygwin或 Windows 版 Git,如果您在某些时候可能需要 Git。
如果安装了 Cygwin,在终端中可以像在 Linux 上一样完成。 GitHub提供了一个很好的关于生成 SSH 密钥的教程。
作为记录:
$ ssh-keygen -t rsa -C "your_email@example.com"
默认情况下,这些键被放置~/.ssh在 Windows 中的 whichC:\Users\USER_NAME\.ssh\或简单%HOME%\.ssh的 .
~/.ssh
C:\Users\USER_NAME\.ssh\
%HOME%\.ssh
您是否从命令行尝试过 puttygen.exe ?带有示例的手册:http: //linux.die.net/man/1/puttygen 也应该在 Windows 上工作。
如果这没有帮助,我会寻找“ssh-keygen”的 Windows 版本http://linux.die.net/man/1/ssh-keygen