Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#15962 - ssh-add cannot comunicate with ssh-agent

Attached to Project: Arch Linux
Opened by Slobodan Simic (slsimic) - Monday, 17 August 2009, 09:35 GMT
Last edited by Jan de Groot (JGC) - Monday, 17 August 2009, 12:50 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: ssh-add can't work properly because ssh-agent when started doesn't export
SSH_AGENT_PID and SSH_AUTH_SOCK variables.
I have manage ssh-add to work by manualy do
SSH_AUTH_SOCK=/tmp/ssh-VDEkAL3022/agent.3022 && export SSH_AUTH_SOCK
SSH_AGENT_PID=3023 && export SSH_AGENT_PID
and then execute ssh-add command


Additional info:
* package version(s) openssh 5.2p1


Steps to reproduce:
[slobodan@archy ~]$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-VDEkAL3022/agent.3022; export SSH_AUTH_SOCK;
SSH_AGENT_PID=3023; export SSH_AGENT_PID;
echo Agent pid 3023;
[slobodan@archy ~]$ ssh-add ~/.ssh/simic_rsa
Could not open a connection to your authentication agent.

This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 17 August 2009, 12:50 GMT
Reason for closing:  Not a bug
Comment by Jan de Groot (JGC) - Monday, 17 August 2009, 12:50 GMT
When running it from a shell, you have to eval it to get the vars exported. From the manpage:

There are two main ways to get an agent set up: The first is
that the agent starts a new subcommand into which some environ‐
ment variables are exported, eg ssh-agent xterm & . The second
is that the agent prints the needed shell commands (either sh(1)
or csh(1) syntax can be generated) which can be evalled in the
calling shell, eg eval `ssh-agent -s` for Bourne-type shells
such as sh(1) or ksh(1) and eval `ssh-agent -c` for csh(1) and
derivatives.

Loading...