in reply to How To Pass To Another Server and Spawn Another Script

How i have handled this in the past (UNIX, by the way) is to set up a server on the remote box that will run the remote commands. The client passes a string to the server via Sockets, the server parses that string (ensures it is a safe command to run) and forks a child process to run the command. It then waits on the child process and collects exit info when the child is reaped and passes the data back to the client over the socket.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
  • Comment on Re: How To Pass To Another Server and Spawn Another Script

Replies are listed 'Best First'.
Re^2: How To Pass To Another Server and Spawn Another Script
by o2bwise (Scribe) on Oct 25, 2006 at 21:44 UTC
    Hi Tank and jeffa,

    Tank, you have exposed some of my ignorance of protocols and their capabilities. I know I can use scp to easily bring the information over. That's about it.

    jeffa, I think you are hitting on what I need to do and in fact your explanation does more than I need. Basically, I could sure use that Socket part to pass information, as well as the ability for the remote server to fetch that value and spawn a simple script. It doesn't need to give any information back to the source server.

    Well, I guess I'll study the Socket mod and see how to pass the info and spawn a program.

    Thanks!

    Tony