This works fine when I run it by hand:
#!/bin/bash
eval `ssh-agent`
ssh-add
/usr/bin/scp me@server:~/file ./
exit 0
However, when the cron runs the file is never touched. I know the ssh keys are right - replace that scp
with an ssh
and it runs fine.