Of course since SSHKeychain always tends to use /tmp/$UID/SSHKeychain.socket (as long as I've been using it) one could probably safely hard code that in the crontab instead.
| [reply] |
| [reply] |
You could also just go into the SSHKeychain preferences and check the box that says 'Manage (and modify) global environment variables', so that it will set $SSH_AUTH_SOCK for you.
| We're not surrounded, we're in a target-rich environment! |
|---|
| [reply] |
| [reply] [d/l] |
Thanks for the comments above. The key was to set the SSH_AUTH_SOCK variable at the head of the file. I have no use for the sexy perl code, though, since I will keep this constant. I can now run cron jobs authorized with SSHKeychain using the following crontab:
SSH_AUTH_SOCK=/tmp/501/SSHKeychain.socket
0 15 * * 1-5 /usr/bin/backup
| [reply] [d/l] |