Re: Problem with ssh-agent and ssh-add

From: Darren Tucker (dtucker_at_gate.dodgy.net.au)
Date: 11/08/05

  • Next message: sgprasad_at_dacafe.com: "Re: Problem with ssh-agent and ssh-add"
    Date: 08 Nov 2005 04:21:07 GMT
    
    

    On 2005-11-07, Richard E. Silverman <res@qoxp.net> wrote:
    >
    >> pclose(fp);
    >> system("ssh-add -l"); //testing purpose
    >
    > I imagine the pclose() terminates the agent.

    Probably not since ssh-agent daemonizes itself (and since it writes
    the pid of the daemon process to stdout which is read earlier, it's
    guaranteed to have happened by then).

    To the OP: are you trying too run ssh-agent and ssh-add as different
    uids? On platforms that support it, ssh-agent will use getpeereuid()
    to determine the user on the other end of the socket connection and
    will refuse to talk to any processes running as a user other than the
    one that started the agent.

    What exactly do the SSH_* environment variables get set to? I had
    difficulty following your code, but inside the while loop it seemed to
    be trying to do something like:

            if ((p = strchr(temp_buff, ';')) != NULL) {
                    *p = '\0';
                    putenv(temp_buff);
            }

    -- 
    Darren Tucker (dtucker at zip.com.au)
    GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
        Good judgement comes with experience. Unfortunately, the experience
    usually comes from bad judgement.
    

  • Next message: sgprasad_at_dacafe.com: "Re: Problem with ssh-agent and ssh-add"

    Relevant Pages

    • Re: scp from cron fails
      ... OpenSSH's ssh-agent takes steps to prevent that. ... ssh-agent can be made setgid because ... even if you're running with the same real uid and gid as the agent. ... Good judgement comes with experience. ...
      (comp.security.ssh)
    • Re: HELP please! Why is the agent NOT recognized
      ... > local SSH client is HPUX 10.20. ... You need to "eval" the output of ssh-agent to set the environment ... variables required to let ssh know how to find the agent. ... Good judgement comes with experience. ...
      (SSH)
    • Re: Apache Software Foundation Server compromised, resecured. (fwd)
      ... >> originating client hosting the first ssh-agent in a chain. ... >> forward your agent from trusted host A to untrusted host B, ... there is a sshd process on Host_B which is ... you used public keys and did not do agent forwarding, ...
      (FreeBSD-Security)
    • Re: ssh-agent stacks up in Linux
      ... Running ssh-agent. ... Having your login shell run a series of shell commands that are ... with the agent. ... > abandon the session. ...
      (comp.security.ssh)
    • Re: ssh-agent not the mother of all my processes?
      ... SSH Agent can be started in two ways. ... will start a shell with ssh-agent running in the background. ...
      (Debian-User)