From: T on
I have a script, which runs as a Windows service under the LocalSystem
account, that I wish to have execute some commands. Specifically, the
program will call plink.exe to create a reverse SSH tunnel. Right now
I'm using Python's subprocess.Popen to do so. When I run it
interactively via an admin account, all is well. However, when I'm
running it via service, no luck. I'm assuming this is to do with the
fact that it's
trying to run under the LocalSystem account, which is failing. What
would be the best way around this? Thanks!
From: T on
After some further testing, I found that my Windows service IS running
plink successfully as LocalSystem (I just changed the command to "C:
\plink.exe > plinkout.txt", and sure enough the help output is in the
output file). However, running the acual command is still not
working:

C:\plink.exe -R 9999:127.0.0.1:2020 -batch -i C:\keyfile.ppk
username(a)10.10.10.1

I'm at a loss as to why this works when I run "servicename debug", but
not when I launch the service...please help!