Topic "Rookie mistake? WinSCP uploads when running a .bat manually but fails through task scheduler"

Author Message


Hi All,

I am new to WinSCP and scripting so please be kind Shocked

When running a .bat manually WinSCP loads the required files from our server to a customers server, however when running through Task Scheduler fails with the error message as below.

The customer now requires this to be running so a solution to this will be greatly appreciated.


. 2017-04-27 16:44:33.125 Offered public key
. 2017-04-27 16:44:33.156 Offer of public key accepted
! 2017-04-27 16:44:33.156 Authenticating with public key "rsa-key-XXXXXXXX"
. 2017-04-27 16:44:33.156 Prompt (3, SSH key passphrase, , Passphrase for key "rsa-key-XXXXXXXX": )
. 2017-04-27 16:44:33.156 Disconnected: Unable to authenticate

WinSCP Version 5.5.6 (Build 4746) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Standard)
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26889
Location: Prague, Czechia
The private key is protected. You have probably not specified the passphrase in the script.

Use -passphrase switch:

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License