[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#454521: marked as done (openssh-client: ssh-agent failed to export its ENV variables)



Your message dated Wed, 5 Dec 2007 22:28:39 +0000
with message-id <20071205222839.GD13328@riva.ucam.org>
and subject line Bug#454521: openssh-client: ssh-agent failed to export its ENV variables
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: openssh-client
Version: 1:4.6p1-5
Severity: normal

*** Please type your report below this line ***

Running ssh-agent from a terminal will print ENV var and export
statements, but these variables are not exported by ssh-agent itself
automatically.

$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-gSVROl6994/agent.6994; export SSH_AUTH_SOCK;
SSH_AGENT_PID=6995; export SSH_AGENT_PID;
echo Agent pid 6995;

$ echo $SSH_AGENT_PID $SSH_AUTH_SOCK
5954 /tmp/ssh-yfNDFY5897/agent.5897

(PID 5954 and socket are from another running agent)

-- System Information:
Debian Release: lenny/sid
 APT prefers testing
 APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-mh (PREEMPT)
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages openssh-client depends on:
ii  adduser               3.105              add and remove users and groups
ii debconf [debconf-2.0] 1.5.17 Debian configuration management sy ii dpkg 1.14.7 package maintenance system for Deb
ii  libc6                 2.6.1-1+b1         GNU C Library: Shared libraries
ii libcomerr2 1.40.2-1 common error description library ii libedit2 2.9.cvs.20050518-4 BSD editline and history libraries
ii  libkrb53              1.6.dfsg.3~beta1-2 MIT Kerberos runtime libraries
ii libncurses5 5.6+20071013-1 Shared libraries for terminal hand
ii  libssl0.9.8           0.9.8g-1           SSL shared libraries
ii passwd 1:4.0.18.1-11 change and administer password and
ii  zlib1g                1:1.2.3.3.dfsg-6   compression library - runtime

openssh-client recommends no packages.

-- no debconf information




--- End Message ---
--- Begin Message ---
# really "can't fix"
tags 454521 wontfix
thanks

On Wed, Dec 05, 2007 at 11:02:47PM +0100, JusTiCe8 wrote:
> Running ssh-agent from a terminal will print ENV var and export
> statements, but these variables are not exported by ssh-agent itself
> automatically.
> 
> $ ssh-agent
> SSH_AUTH_SOCK=/tmp/ssh-gSVROl6994/agent.6994; export SSH_AUTH_SOCK;
> SSH_AGENT_PID=6995; export SSH_AGENT_PID;
> echo Agent pid 6995;
> 
> $ echo $SSH_AGENT_PID $SSH_AUTH_SOCK
> 5954 /tmp/ssh-yfNDFY5897/agent.5897

I'm afraid it simply isn't possible for ssh-agent to export them itself
due to how Unix works. When you run ssh-agent, you're starting a child
process, and a child process cannot set environment variables in its
parent, only for itself and its own children. ssh-agent would only be
able to do what you're asking if it were part of the shell.

The recommended ways to use ssh-agent are in its manual page:

     There are two main ways to get an agent set up: The first is that
     the agent starts a new subcommand into which some environment
     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 call-
     ing 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 deriva-
     tives.

You could set up an alias to do that for you if you prefer, or use
keychain, or various other similar approaches.

Cheers,

-- 
Colin Watson                                       [cjwatson@debian.org]


--- End Message ---

Reply to: