Resolution:
1. I connect to the server once from the GUI, so that the host's key is stored in the host key cache (using .ini storage).
2. I use the /ini option. I copy the .ini file from the WinSCP3 directory int a directory accessible to the job user. It now contains the relevant host key (see step 1).
3. Now the script runs okay when started by the job user account.
4. There are still errors due to permissions and time-stamp. Since I don't want the lose the time-stamp information, I did not want to disable these options. I was able to change the permissions on the target folder on the server so that the errors no longer occur. I also have the script delete (rm) the remote file before put-ing the new version.
1. I connect to the server once from the GUI, so that the host's key is stored in the host key cache (using .ini storage).
2. I use the /ini option. I copy the .ini file from the WinSCP3 directory int a directory accessible to the job user. It now contains the relevant host key (see step 1).
3. Now the script runs okay when started by the job user account.
4. There are still errors due to permissions and time-stamp. Since I don't want the lose the time-stamp information, I did not want to disable these options. I was able to change the permissions on the target folder on the server so that the errors no longer occur. I also have the script delete (rm) the remote file before put-ing the new version.