Re: How Can I Securely Execute Script on Remote Windows Host?



On 16 Sep, 05:38, "Will" <westes-...@xxxxxxxxxxxxxx> wrote:
What are the most secure options to allow a command line script written on
machine A to synchronously execute another command line script written on
machine B, wait on response, and retrieve return code at the end of
execution. Assume client machine A is UNIX and server machine B is
Windows.

If the command line script on machine B can be well defined, take a
good look at NRPE. It's a plug-in for Nagios targets that executes
arbitrary scripts and responds in a reasonably well thought out way
for low risk operations, such as "du" commands or mysql queries.

SSH has an issue in that its operations are tough to limit to only a
few commands. There are ways involving the use of SSH keys with
defined operations permitted. on the target, which are used for ssh
+svnserve setups. But that SSH client account is tough to keep in a
specific target directory, without allowing access to the rest of the
filesystem.

What kind of "command line script" do you want to run? Arbitrary ones?
Then SSH might work well, but with the automatic security risks of
providing shell access on the target host. For better defined ones
where you don't worry about the result, you can use NRPE or even a
webserver that responds with an output code to a specific query.

.



Relevant Pages

  • CGIscript.net - csMailto.cgi - Remote Command Execution
    ... CGIscript.net - csMailto.cgi - Remote Command ... csMailto is a perl cgi formmail script developed by ... execute command on server and mail output to anyone ...
    (Bugtraq)
  • Scripts using SSH and SSH_ASKPASS
    ... To test SSH scripts you better destroy the control TTY. ... The trick is to run YOUR script on YOUR local ... As for the password relaying command: this needs not be an X command. ... # we read one line from a temporary pipe. ...
    (comp.security.ssh)
  • Re: shell scripting
    ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
    (comp.unix.questions)
  • Re: shell scripting
    ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
    (comp.unix.shell)
  • =?iso-8859-1?Q?Re:_Jcl?=
    ... I can send you a program that you execute as a step in your job and it ... I have a command and job scheduler that is available in a free version ... demand script processor with the full scripting ability so that your job ...
    (bit.listserv.ibm-main)