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: ashley@myhost:~ > 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: ashley@myhost:~ > 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: ashley@myhost:~ > echo $SSH_AGENT_PID ashley@myhost:~ > ssh-agent -k SSH_AGENT_PID not set, cannot kill agent If I set them by hand all is well: ashley@myhost:~ > SSH_AGENT_PID=27105 ashley@myhost:~ > export $SSH_AGENT_PID ashley@myhost:~ > echo $SSH_AGENT_PID 27105 ashley@myhost:~ > 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 : ashley@myhost:~ > 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 ashley@myhost:~ > echo $SSH_AGENT_PID ashley@myhost:~ > 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.