On Fri, Apr 13, 2001 at 08:47 -0700, Ashley wrote:
I'm trying to learn the use of ssh-agent. Why don't the environment vars SSH_AGENT_PID, SSH_AUTH_SOCK get set?
You might use ssh-agent(1) in a way it wasn't designed for. Read the manpage once more and look at the "command" discussion. ----- from the OpenSSH 2.3.0 manpage ---------------------------- [ ... ] SYNOPSIS ssh-agent [-c | -s] [-k] [command [args ...]] DESCRIPTION [ ... ] If a commandline is given, this is executed as a subprocess of the agent. When the command dies, so does the agent. [ ... ] There are two main ways to get an agent setup: Either you let the agent start a new subcommand into which some environment variables are export- ed, or you let the agent print the needed shell commands (either sh(1) or csh(1) syntax can be generated) which can be evalled in the calling shell. Later ssh(1) look at these variables and use them to establish a connection to the agent. [ ... ] ----------------------------------------------------------------- IIUC you're supposed to fork off your "regular working session" from the agent, because it hands the essential data to all of its children easily. Everything else (grabbing the socket as superuser or doing so as another instance of the same user -- that's basically what you are trying to do) is a hack. You see that you had to "eval" the output somewhere else (and thus transport the info there by some means). "ssh-agent $SHELL" might help you. Or "ssh-agent $HOW_I_START_X" or something. Wherever it's convenient for you to invoke the agent and whatever is your regular environment your sessions run in. "eval `ssh-agent`" might work, too (you see how it's similar to the resize(1) command?). But then you have to explicitely kill it later plus remove the administrative info (like "eval `ssh-agent -k`"). Why not just start working and have it die when you're done? virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you.