I have a set of files on a remote sftp which I need to download to a server every day. sftp uses ssh keys to authenticate, so I created a ssh key and added to the remote server authorized folder. I'm able to ssh/sftp successfully manually. I h've creatd a script which first does a eval
ssh-agent -s and then
ssh-add. When run manually, we get a prompt for passphrase and scp works fine.
eval `ssh-agent -s`; ssh-add; #copy from remote to local
I need advice/best practice on how I can avoid keying in passphrase when I add this crontab to run everyday.