LoginSignup
16
16

More than 5 years have passed since last update.

ssh-add がCould not open a connection to your authentication agent.と出て成功しないとき

Posted at

ssh-addは環境変数SSH_AUTH_SOCKを参照し,ssh-agentと通信するのですが,ディストリビューションによってはインストール時にこの環境設定が設定されないようです.(Fedora19ではダメでした)

なので,
shell-session
Could not open a connection to your authentication agent.

とエラーになってしまうことがあります.
shell-session
eval $(ssh-agent)

とすることで,この環境変数を一時的に設定できます.この後,もう一度ssh-addをすれば,秘密鍵をssh-agentに登録することができます.

16
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
16