【问题标题】:How to find .ssh private and public keys如何找到 .ssh 私钥和公钥
【发布时间】:2015-08-16 11:32:47
【问题描述】:

我一直在尝试将 bitbucket 连接到我的本地 git 存储库,但很难找到私钥和公钥。

我在 bash 中从这个命令生成 .ssh 密钥

$ ssh keygen -t rsa

Generating public/private rsa key pairs
Enter file in which to save the key (/c/Users/TOSHIBA/.ssh/id_rsa):    password.txt (I don't have password.txt file on my system it was random file name I provided) 

Enter passphrase(empty for no passphrase): (I left empty)
Enter same passphrase again:
Your identification has been saved in password.txt.
You public key has been saved in password.txt.pub
The key fingerprint is:
9c:9e:07:63:45:ad:76:b3:d0:e1:e1:0f:6c:20:aa:c4 TOSHIBA@TOSHIBA-PC
The Key's random art image is

我无法找出生成的密钥。如果我做错了什么,请告诉我。

谢谢

【问题讨论】:

    标签: git bash ssh key rsa


    【解决方案1】:

    私钥在您的文件password.txt 中,公钥在password.txt.pub 中。完整路径取决于您当前在 shell 中的工作目录。

    您可能只是按 Enter 而不是文件名。然后 ssh-keygen 会将其保存为默认文件名/c/Users/TOSHIBA/.ssh/id_rsa。使用默认文件名是个好主意,因为 ssh 客户端会自动在那里找到密钥。

    【讨论】:

    • 谢谢,我发现并成功将我的第一个项目上传到 bitbucket。
    猜你喜欢
    • 2017-02-10
    • 2023-03-24
    • 2020-11-27
    • 2013-03-24
    • 2016-03-08
    • 1970-01-01
    • 2016-09-15
    • 2013-07-09
    • 2015-07-11
    相关资源
    最近更新 更多