Ho finito col seguente plist:
<?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>org.openbsd.ssh-agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ssh-agent</string>
<string>-l</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<!--
<key>SecureSocketWithKey</key>
<string>SSH_AUTH_SOCK</string>
-->
<key>SockPathName</key>
<string>/Users/myusername/.ssh-agent.sock</string>
<key>SockPathMode</key>
<integer>384</integer> <!-- 0600b8 in decimal -->
<key>SockPathGroup</key>
<integer>0</integer>
</dict>
</dict>
<key>EnvironmentVariables</key>
<dict>
<key>SSH_AUTH_SOCK</key>
<string>/Users/myusername/.ssh-agent.sock</string>
</dict>
<key>EnableTransactions</key>
<true/>
</dict>
</plist>
L'unico svantaggio è la necessità di un nome utente hard coded. Se qualcuno sa come risolvere anche questo ...
Ho appena sovrascritto il file predefinito in /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist
, quindi ho eseguito i seguenti comandi:
launchctl unload /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist
launchctl load /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist
launchctl start org.openbsd.ssh-agent