I'm looking to add a default timeout to the ssh-agent run by macos at startup. So far I've determined that the file that runs this is /System/Library/LaunchAgents/com.openssh.ssh-agent.plist
which contains:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.openssh.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>
</dict>
</dict>
<key>EnableTransactions</key>
<true/>
</dict>
</plist>
Now I think I'm able to add to the program arguments array (tell me if I'm not) but it caught my eye that it contains -l
which I cannot find in any documentation. Does someone have any idea why? Should I remove it?
AddKeysToAgent
you can set a timeout of the added key, and yes that is nice, but I was trying to see if there was some way to do that even if I added the key withssh-add
and not having to type-t 86400
every time. Yes it is a silly sidequest but it lead me to the question of-l
which is the focus here.