SSH-添加错误"无法连接..."即使在EVAL的ssh-agent [英] ssh-add error "Could not connect..." even after eval ssh-agent
问题描述
试图从git仓库拉,我这样做的时候得到这个错误:
Trying to pull from a git repo, I get this error when doing so:
Permission denied (publickey)
fatal: The remote end hung up unexpectantly
于是我试着和ssh-添加我的密钥文件,要做到这一点我做的:
So I try and ssh-add my keyfile, to do this I do:
eval ssh-agent
ssh-add ./bitnami/.ssh/keyFile
和取得
Could not open a connection to your authentication agent
我ssh方式连接到一个AWS EC2与汇出AMI,Ubuntu的操作系统。
I'm sshing into an AWS EC2 with a Bitnami AMI, Ubuntu OS.
我注意到,我有几个的ssh-agent处理几个不同的尝试evaling我的ssh-agent后去,所以我做了
I noticed that I had several ssh-agent processes going after several different attempts at evaling my ssh-agent, so I did a
killall ssh-agent
再尝试的eval,SSH-添加过程中再次,仍然得到无法打开...错误
then tried the eval, ssh-add process again, still get "Could not open..." error
推荐答案
在创建一个配置文件的〜/ .ssh /并添加
Creating a config file at ~/.ssh/ and adding
IdentityFile ~/.ssh/keyFile
解决这个问题。这不回答上面的问题,但它确实解决问题的全过程。
Solved the issue. This doesn't answer the above question, but it does solve the problem as a whole.
通过尝试ssh到服务器与 -v
标记找到帮我看看,关键文件没有被读取(明显)。
Found by attempting to ssh into the server with the -v
flag helped me see that the key files were not being read (obviously).
这篇关于SSH-添加错误"无法连接..."即使在EVAL的ssh-agent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!