首先,我开始的ssh-agent与无法打开连接到认证代理,即使SSH_AUTH_SOCK定义
eval `ssh-agent -s`
我确认SSH_AUTH_SOCK
通过运行echo $SSH_AUTH_SOCK
,这令人鼓舞返回/tmp/ssh-oCsFfHvR3345/agent.3345
设置。
然而,当我运行sudo ssh-add ~/.ssh/id_rsa
,我得到
Could not open a connection to your authentication agent.
此外,ssd-add -l
回报The agent has no identities.
你为什么使用'sudo'?你想以普通用户身份运行它。 – 2014-12-04 18:12:00