Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
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)

Options

Topic review

martin

Re: Scheduled Task with Batch File not authenticating

Please attach the log.
brianne.burcham

Scheduled Task with Batch File not authenticating

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
close


Any help would be extremely appreciated, as this is a production issue.