Source keychain credentials in Perl

9 Jun 2009

I use keychain for securely caching my ssh key credentials when running scripts from cron.

Here’s how to use keychain with Perl scripts:

Create a wrapper script:
source ~/.keychain/hostname-sh

To run a one-off command do:

system("source ~/.keychain/hostname-sh; cmd");
comments powered by Disqus

  « Previous: Next: »