保存ssh密钥失败 [英] Saving ssh key fails

查看:980
本文介绍了保存ssh密钥失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始了一个Git教程,我得到了一个deadend:我尝试生成一个rsa密钥部分,但它失败了。
我在git bash中做了这个:

  ssh-keygen -t rsa -Cmyemail@myemail.com 

我得到了这个:

 生成公钥/私钥rsa密钥对。 
输入要保存密钥的文件(/c/Users/Eva/.ssh/id_rsa):
输入密码:
再次输入相同的密码:
open / c /用户/ Eva / .ssh / id_rsa失败:没有这样的文件或目录。
保存密钥失败:/c/Users/Eva/.ssh/id_rsa。

我试着保存在不同的文件夹中,并且它确定。但现在我执行命令 ssh -T git@github.com ,它给了我错误 permisson denied(publickey)。


  1. 使用Putty Gen生成密钥

  2. 将密钥导出为开放的SSH密钥 @VonC创建.ssh目录,然后您可以将私钥和公钥放在那里

  3. 或者使用GUI程序(如 Tortoise Git )使用SSH密钥

请参阅 http://ask-leo.com/how_do_i_create_and_use_public_keys_with_ssh.html


i just started a Git tutorial and I get to a deadend: I try to generate a rsa key part and it fails. I did this, in git bash:

ssh-keygen -t rsa -C "myemail@myemail.com"

And i got this:

Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Eva/.ssh/id_rsa):
enter passphrase:
enter same passphrase again:
open /c/Users/Eva/.ssh/id_rsa failed: no such file or directory.
Saving the key failed:/c/Users/Eva/.ssh/id_rsa.

I tried to save in a different folder and it went OK. but now i do the command ssh -T git@github.com and it gives me the error permisson denied (publickey).

解决方案

If you prefer to use a GUI to create the keys

  1. Use Putty Gen to generate a key
  2. Export the key as an open SSH key
  3. As mentioned by @VonC create the .ssh directory and then you can drop the private and public keys in there
  4. Or use a GUI program (like Tortoise Git) to use the SSH keys

For a walkthrough on putty gen for the above steps, please see http://ask-leo.com/how_do_i_create_and_use_public_keys_with_ssh.html

这篇关于保存ssh密钥失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆