2

On a Windows machine, I have a script that starts a Linux server, performs a backup, and finally shuts down the server. The script uses Plink with public key authentication to run the shutdown command on the server. The private key is supplied by Pageant.

Shutting down the server does not work if I have the Windows task scheduler run the script. I guess, there is some kind of sandbox that prevents the script from using the Pageant agent.

Is there a way to access the private key from within a scheduled task? Any suggestions for an alternative approach?

maf
  • 143

1 Answers1

1

The Plink (or PuTTY) can access the Pageant, if it runs in the same Windows session only.

If you run the Pageant in the interactive Windows session, the Plink executed with Windows Scheduler will be able to access it, only if you run the task using the same local account and you have the Security option > Run only when user is logged on selected for the task.

In general Pageant is not intended for this kind of use. It's intended to make interactive authentication convenient. It's not intended to automate authentication.


See also Turn off “isolation mode” in Vista Task Scheduler?