[launchd-dev] Obtaining the value of SSH_AUTH_SOCK in an entry?

Dave Zarzycki zarzycki at apple.com
Thu Mar 27 08:12:03 PDT 2008


Chris,

Mac OS X Leopard, as shipped, automatically manages 'ssh-agent' and  
the corresponding environmental variable. One can verify this like so:

$ env | grep SSH_AUTH
SSH_AUTH_SOCK=/tmp/launch-01KBeh/Listeners
$

…and by reviewing /System/Library/LaunchAgents/org.openbsd.ssh- 
agent.plist. You can also verify which processes have inherited the  
SSH_AUTH_SOCK variable with:

ps axe


davez


On Mar 27, 2008, at 4:53 AM, Chris Cleeland wrote:
> Hi,
>
> I'm trying to set up an entry for launchd that will fire off ssh
> on-demand to create a tunnel.  I would like for the ssh to get
> authentication information from ssh-agent, but I'm not sure if launchd
> children inherit SSH_AUTH_SOCK in the environment, or if I somehow
> have to designate that it gets it.
>
> In the pre-leopard days when I used SSHKeyChain.app, the SSH_AUTH_SOCK
> value was constant, and I could just set SSH_AUTH_SOCK in an
> <EnvironmentVariables> declaration in the entry.
>
> Thanks,
> -cj
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev



More information about the launchd-dev mailing list