# Pastebin Gach9okn export SSH_ASKPASS=/path/to/my/script.sh runcount=$(ps -ef | grep "ssh-agent" | grep -v "grep" | wc -l) if [ $runcount -eq 0 ]; then echo Starting SSH Agent eval $(ssh-agent -s) ssh-add ~/.ssh/id_rsa fi