I have a problem trying to launch a sshpass in a bash script to be launched by cron.
I program the cron:
4 14 14 1 1 /Users/manuel/Downloads/prueba.sh
prueba.sh has this content:
export SSHPASS=mypassword
sshpass -e ssh -oBatchMode=no user@host 'cd www;git pull;exit;'
Then I get:
/Users/manuel/Downloads/prueba.sh: line 3: sshpass: command not found
But if I launch script manually in the terminal, it works. What's the matter?
I tried with the full path of sshpass (/usr/local/bin/sshpass)
and with parameter StrictHostKeyChecking=no
. I don't know what's my error.
Thanks.