Hi, The man page for launchd.plist says: SecureSocketWithKey <string> This optional key is a variant of SockPathName. Instead of binding to a known path, a securely generated socket is created and the path is assigned to the environment variable that is inherited by all jobs spawned by launchd. However, the SSH_AUTH_SOCK environment variable generated by Leopard's /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist doesn't seem to be available to my ~/Library/LaunchAgents. E.g. the following: <?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"> <plist version="1.0"> <dict> <key>Label</key> <string>test.7B21D717-E7AE-4DB0-905F-7D40F8A6ABE2</string> <key>Program</key> <string>/usr/bin/env</string> <key>inetdCompatibility</key> <dict> <key>Wait</key> <false/> </dict> <key>Sockets</key> <dict> <key>Listeners</key> <dict> <key>SockNodeName</key> <string>127.0.0.1</string> <key>SockFamily</key> <string>IPv4</string> <key>SockServiceName</key> <string>34567</string> </dict> </dict> </dict> </plist> when accessed via 'nc localhost 34567' generates a list of several environment variables, none of which is SSH_AUTH_SOCK. Is this the expected behaviour? If so, how can I make a LaunchAgent for ssh that can access my ssh-agent across reboots? Thanks, Hamish
This is all context sensitive. Right now, the ssh-agent is only loaded into the GUI login context. The environment variable it exports is only available to the jobs associated with that session. Where are you installing your plist? If you're loading it by hand, what arguments are you passing to the 'launchctl' tool? davez On Nov 15, 2007, at 5:00 AM, Hamish Allan wrote:
Hi,
The man page for launchd.plist says:
SecureSocketWithKey <string> This optional key is a variant of SockPathName. Instead of binding to a known path, a securely generated socket is created and the path is assigned to the environment variable that is inherited by all jobs spawned by launchd.
However, the SSH_AUTH_SOCK environment variable generated by Leopard's /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist doesn't seem to be available to my ~/Library/LaunchAgents. E.g. the following:
<?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"> <plist version="1.0"> <dict> <key>Label</key> <string>test.7B21D717-E7AE-4DB0-905F-7D40F8A6ABE2</string> <key>Program</key> <string>/usr/bin/env</string> <key>inetdCompatibility</key> <dict> <key>Wait</key> <false/> </dict> <key>Sockets</key> <dict> <key>Listeners</key> <dict> <key>SockNodeName</key> <string>127.0.0.1</string> <key>SockFamily</key> <string>IPv4</string> <key>SockServiceName</key> <string>34567</string> </dict> </dict> </dict> </plist>
when accessed via 'nc localhost 34567' generates a list of several environment variables, none of which is SSH_AUTH_SOCK.
Is this the expected behaviour? If so, how can I make a LaunchAgent for ssh that can access my ssh-agent across reboots?
Thanks, Hamish _______________________________________________ launchd-dev mailing list launchd-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/launchd-dev
On Nov 15, 2007 5:16 PM, Dave Zarzycki <zarzycki@apple.com> wrote:
This is all context sensitive. Right now, the ssh-agent is only loaded into the GUI login context. The environment variable it exports is only available to the jobs associated with that session.
Where are you installing your plist?
~/Library/LaunchAgents
If you're loading it by hand, what arguments are you passing to the 'launchctl' tool?
No arguments. I just tried passing '-S LoginWindow' but it reports 'nothing found to load' (even if I give it the full path of my .plist file). Thanks, Hamish
On Nov 15, 2007, at 9:45 AM, Hamish Allan wrote:
On Nov 15, 2007 5:16 PM, Dave Zarzycki <zarzycki@apple.com> wrote:
This is all context sensitive. Right now, the ssh-agent is only loaded into the GUI login context. The environment variable it exports is only available to the jobs associated with that session.
Where are you installing your plist?
~/Library/LaunchAgents
If you're loading it by hand, what arguments are you passing to the 'launchctl' tool?
No arguments. I just tried passing '-S LoginWindow' but it reports 'nothing found to load' (even if I give it the full path of my .plist file).
That makes some amount of sense. The 'ssh-agent' job isn't configured to run in the LoginWindow context, and neither is your job's plist. davez
On Nov 15, 2007 6:38 PM, Dave Zarzycki <zarzycki@apple.com> wrote:
That makes some amount of sense. The 'ssh-agent' job isn't configured to run in the LoginWindow context, and neither is your job's plist.
Okay, I've RTFM now :) and launched successfully in the 'Aqua' context. Thanks, Hamish
participants (2)
-
Dave Zarzycki
-
Hamish Allan