Topic "Scheduled Task with Batch File not authenticating"

Author Message


I have a scheduled task that is connecting to an environment through WinSCP. I have a batch file written. I have removed everything from my batch file except the connection to see if that was causing the issue, but it didn't help. I am able to connect directly through WinSCP. I have it writing to a log. The log is saying that it is accepting the public key, prompts for the passphrase, then says disconnected: unable to authenticate. I have a lot of other SFTP connections that use scheduled tasks and batch files with the exact same process, but I don't have these issues. Please see the code example below.

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.exe" /script=C:\script.txt /log=C:\log.txt

script file
option batch continue

option confirm off

open "connection"

lcd C:\Files

put *.gpg

Any help would be extremely appreciated, as this is a production issue.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
Please attach the log.
Martin Prikryl

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