Cron job giving error while running SSH command

Hi All,

The script which i am using to SSH to remote server is working fine when i run is using ./ but when cron runs it it gives error that "ssh: not found"

please help!!!

Use the complete path to ssh. On our system it is /usr/bin/ssh.

which ssh

will give you that information

Hi jim,

Thanks for the response but could you please elaborate it.

The local server doesn't have /usr/bin/ssh though the remote server has this(/usr/bin/ssh).

How should I modify my code. Below is the code which i am using:

ssh username@remote_server <<EOF
move files from one folder to another
EOF

Hi Jim,

Thanks for the reply. The solution worked really great.