danhper / danhper/fish-ssh-agent

SSH_AGENT_PID not set

Open
#2 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
375
Forks
54
PR merge metrics
No merged PRs in 30d

Description

`SSH_AGENT_PID` is not set when I try to add an SSH key with `ssh-add ~/.ssh/id_rsa`.

```
$ ssh-add ~/.ssh/id_rsa
Could not open a connection to your authentication agent.
$ echo $SSH_AGENT_PID

$ # ↑ empty string ↑
```

Yet, `ssh-agent` is well started:

```
$ ps aux | grep ssh-agent
morgan 16643 0.0 0.2 3688 984 ? Ss 11:43 0:00 ssh-agent -c
```

I did manage to add a key with the following commands:

```
$ eval (ssh-agent -c)
Agent pid 18541
$ echo $SSH_AGENT_PID
18541
$ ssh-add ~/.ssh/id_rsa
Identity added: /home/morgan/.ssh/id_rsa (rsa w/o comment)
```

My configuration:

```
$ fish --version
fish, version 2.2.0
$ ssh -V
OpenSSH_6.7p1 Raspbian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016
```

Not sure how `ssh-agent` works though... Any help would be much appreciated.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by reproducing the fish 2.2.0 commands with ssh-agent -c, ssh-add, and the reported environment, then trace how the fish-ssh-agent entry point exports SSH_AGENT_PID; done means ssh-add can connect to the running agent without manual recovery commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
fish, shell
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.