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.

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


Re: Scripting Automation Does Not Work with SSH Keys

When you run the script manually, it authenticates using a key loaded from Pageant. When the script is run in Task Scheduler, it run in a different Windows session, which cannot access the Pageant in your user session. And if you run the script on different machine, it cannot work at all.

You need to explicitly specify the key in your script. Use -privatekey switch:

See also

Scripting Automation Does Not Work with SSH Keys

I have a working script that runs manually but will not run via the Task Scheduler nor will it work on a different environment (new user, new computer, etc.). I have tried to export and import the configurations from the working script/computer but it does not work. I have also tried importing the registry configurations from the working computer to the new computer, again it does not work. I have uninstalled and installed an old version of WinSCP to match the working one, and still it does not work. There are not any examples of how this is done. The documentation simply says to transfer the configuration to the new computer by exporting and importing the INI files and placing it in the same directory as the .exe file but that does not work. I am at a loss as to how this is not working anymore when it was previously at one point in time. I have attached the logs from the two machines for your review and also the cmd that comes up for both so you can see that the working one does not ask for the password, it grants me access with ssh but the other non-working script asks for a password, which I do not have. Please help as the documentation on how to transfer configurations is not clear nor are there any examples as to how to accomplish this. I have tried everything I could but I am getting nowhere.

Please contact me regarding this issue at