I'm trying to automate a process on a remote machine using a python script. The machine is a windows machine and I've installed CopSSH on it in order to SSH into it to run commands. I'm having trouble getting perl scripts to run from the CopSSH terminal. I get a command not found error. Is there a special way that I have to have perl installed in order to do this? Or does anyone know how to install perl with CopSSH?
I suspect CopSSH is giving you different environment vars to a normal GUI login. I'd suggest you type 'set' and see if perl is in the path with any other environment vars it might need.
Here is some explanation of setting up the CopSSH user environment. It may be of use.
Are you using ActiveState or Strawberry Perl? What error messages are you getting? You may find the answers to How do I run programs with Strawberry Perl helpful.
I just realized CopSSH is based on Cygwin which I think means paths would have to be specified differently. Try using, for example,
/cygdrive/c/Program\ Files/My\ Program/myprog.exe
instead of
"C:\Program Files\My Program\myprog.exe"
.
BTW, the following CopSSH FAQ might be applicable as well: http://www.itefix.no/i2/node/31.