Is it possible to change the SSH_AUTH_SOCK path? I would like to have the ssh-agent socket inside my home directory, but currently it is created inside /private/tmp.

I see that the agent is managed though launchctl and this plist: /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist, but I don't know how to modify this file to have the socket, for example, at ~/.ssh-agent.sock.
I ended up with the following plist:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;org.openbsd.ssh-agent&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/bin/ssh-agent&lt;/string&gt;
        &lt;string&gt;-l&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;Sockets&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Listeners&lt;/key&gt;
        &lt;dict&gt;
            &lt;!--
                 &lt;key&gt;SecureSocketWithKey&lt;/key&gt;
                 &lt;string&gt;SSH_AUTH_SOCK&lt;/string&gt;
            --&gt;
            &lt;key&gt;SockPathName&lt;/key&gt;
            &lt;string&gt;/Users/myusername/.ssh-agent.sock&lt;/string&gt;
            &lt;key&gt;SockPathMode&lt;/key&gt;
            &lt;integer&gt;384&lt;/integer&gt; &lt;!-- 0600b8 in decimal --&gt;
            &lt;key&gt;SockPathGroup&lt;/key&gt;
            &lt;integer&gt;0&lt;/integer&gt;
        &lt;/dict&gt;
    &lt;/dict&gt;
    &lt;key&gt;EnvironmentVariables&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;SSH_AUTH_SOCK&lt;/key&gt;
        &lt;string&gt;/Users/myusername/.ssh-agent.sock&lt;/string&gt;
    &lt;/dict&gt;
    &lt;key&gt;EnableTransactions&lt;/key&gt;
    &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


The only downside is the need for an hard coded username. If somebody know how to solve this as well...

I just overwrote the default file at /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist, then I executed the following commands:

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