Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


I figured it out ie. I found the help file "Running a Script under a Different Account (e.g., Using a Scheduler)".

So I basically had to migrate the registry file from my profile to the service acct's profile b/c that's the account that runs the job.

Disconnected: Unable to authenticate

I have winSCP installed on my Win Server 2008 box. I have batch job configured to SSH to a Linux box nightly, login with credentials saved in winSCP. The job copies files from Win server to a directory on the linux server.
The job always fails with a error: Unable to authenticate. If I run the batch file myself it works fine. I had this same batch/scheduled task working fine on my Win Server 2000 box prior to moving to 2008.

When Task Mgr runs the batch job the following output is produced in my log file:
! 2014-04-08 11:53:22.677 Using username "xxx".
. 2014-04-08 11:53:22.679 Prompt (7, SSH password, , &Password: )
. 2014-04-08 11:53:32.681 Disconnected: Unable to authenticate

When I double-click the batch file the following is produced in the log file and the job runs successfully:

! 2014-04-08 11:56:28.277 Using username "xxx".
. 2014-04-08 11:56:28.280 Prompt (7, SSH password, , &Password: )
. 2014-04-08 11:56:28.280 Using stored password.
. 2014-04-08 11:56:28.280 Sent password
. 2014-04-08 11:56:28.284 Access granted
. 2014-04-08 11:56:28.352 Opened channel for session
. 2014-04-08 11:56:28.357 Started a shell/command

The difference in the output above tells me that when the batch file is run from Task Mgr it's not referencing the stored password. So how do I force it to use the stored password?