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?