Install Keychain:
sudo apt-get install keychain
Put it in your $ HOME / .bash_profile file:
if [ -z "$SSH_AUTH_SOCK" ] ; then eval `ssh-agent -s` fi eval `keychain --eval id_rsa`
It will ask for your password the first time you log in and save your credentials until the next reboot.
Insert it at the beginning of your cron script:
source $HOME/.keychain/${HOSTNAME}-sh
If you use another language, for example python, call it from a shell script.
This works for me, I hope this helps too.
user2849906
source share