OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Ashley (ashleygdnai.com)
Date: Fri Apr 13 2001 - 10:47:25 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    I'm trying to learn the use of ssh-agent. Why don't the environment vars
    SSH_AGENT_PID, SSH_AUTH_SOCK get set?

    I run ssh-agent and get:

    ashleymyhost:~ > ssh-agent
    SSH_AUTH_SOCK=/tmp/ssh-XXap8e9I/agent.27104; export SSH_AUTH_SOCK;
    SSH_AGENT_PID=27105; export SSH_AGENT_PID;
    echo Agent pid 27105;

    I check the pid:
    ashleymyhost:~ > ps aux
    .
    .
    ashley 27105 0.0 0.0 1628 636 ? S 10:56 0:00 ssh-agent
    ashley 27106 0.0 0.0 2420 724 pts/2 R 10:57 0:00 ps aux

    But the environment vars are not available:
    ashleymyhost:~ > echo $SSH_AGENT_PID

    ashleymyhost:~ > ssh-agent -k
    SSH_AGENT_PID not set, cannot kill agent

    If I set them by hand all is well:
    ashleymyhost:~ > SSH_AGENT_PID=27105
    ashleymyhost:~ > export $SSH_AGENT_PID
    ashleymyhost:~ > echo $SSH_AGENT_PID
    27105
    ashleymyhost:~ > ssh-agent -k
    unset SSH_AUTH_SOCK;
    unset SSH_AGENT_PID;
    echo Agent pid 27105 killed;

    If I select the output of ssh-agent with the mouse and execute it,
    everything is fine. How can I get ssh-agent to do this by itself?

    I tried this :
    ashleymyhost:~ > ssh-agent |bash -x
    + SSH_AUTH_SOCK=/tmp/ssh-XXAv2eMv/agent.27247
    + export SSH_AUTH_SOCK
    + SSH_AGENT_PID=27249
    + export SSH_AGENT_PID
    + echo Agent pid 27249
    Agent pid 27249
    ashleymyhost:~ > echo $SSH_AGENT_PID

    ashleymyhost:~ >

    Oh,well. I'm obviously missing something.

    It seems to me that a 558 page O'Reilly bood may be overkill, but
    the manpages alone aren't enough for some of us slow ones.

    -- 
    -ashley
    

    One of these days I'm going to completely organize my life.

    --------------------------------------------------------------------- To unsubscribe, e-mail: suse-security-unsubscribesuse.com For additional commands, e-mail: suse-security-helpsuse.com