Re: Can ssh add keys to ssh-agent?

Greg Wooledge wrote:
Now you've got two agents, and two shells with different
environment variables pointing to the different agents. Not to mention
two ssh-add passphrase prompts, which is the thing you were trying to
avoid all along.
There's still
a race condition when you check whether the key is already loaded,
but the worst you can do here is get an extra passphrase prompt,
which is relatively harmless.
Either way, not the end of the world. Even if somehow you ended up with 2 ssh-agents running, it would be no big deal at all since it wouldn't stop anything from working that I can think of. I have been using similar techniques + more for a long time without ever having any problem, never a single (second/re)-prompt or second agent, not to mention the fact that I don't ever have to type ssh-add, it works transparently between my xterm, ssh sessions, console etc...


Hari Sekhon
Always open to interesting opportunities