Difference between revisions of "Managing multiple SSH agents"
1,756 BYTES ADDED
, 5 YEARS AGO
== OS X solution ==
=== Using multiple agents via launchd (better) ===
This has been tested on Mac OS X El Capitan. It should work on older releases, please update this text if it works with later versions of OSX.
You can start multiple ssh-agents through launchd user LaunchAgents.
To make this work write the following plist to <code>~/Library/LaunchAgents/org.wmflabs.ssh-agent.plist</code>
<syntaxhighlight lang="xml"><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<code>launchctl load ~/Library/LaunchAgents/org.wmflabs.ssh-agent.plist</code>
and if you want, start it
<code>launchctl start org.wmflabs.ssh-agent</code>.
This will start an ssh agent instance every time you login that will be reachable at <code>/private/tmp/.ssh-agent-labs</code>.
Repeat the process for every domain you're connecting to.
You can then proceed as suggested in the Linux section below in order to configure ssh. Please note that openssh 7.3 is only available via homebrew at the time of writing. However, do NOT use homebrew's ssh-agent in the launch agent as it's not interacting well with launchd.
=== Run one agent per terminal ===
The default terminal application can be modified in how it runs to have every tab run its own ssh-agent.