sickill/bitpocket — Issue #7: Recommend changing docs regarding SSH keys
Author: firecat53
Created: 2012-01-03 17:13:15+00:00
State: open

I've always been a fan of using passphrase SSH keys even for my automated scripts. The [keychain](http://www.funtoo.org/wiki/Keychain) application leverages ssh-agent to manage the keys with passphrases, and enables scripts to access the keys from within cron. I use something like this to source my keys:
type -P keychain &>/dev/null || { echo "I require keychain but it's not installed. Aborting." >&2; exit 1; }
eval `keychain --noask --eval --agents ssh id_rsa` || exit 1
I believe something similar can be done with ssh-agent by itself.

I just think it's important to make people aware that there are easy options for using passphrase-encrypted keys from within cron jobs and scripts.

Thanks!
Scott