You need to have a deamon on the remote server capable of launching the Perl script, and you need to be able to talk to that deamon. SSH deamons, HTTP deamons, HTTPS deamons, FTP deamons and many others match these criteria. It's up to you to choose the one that suits you best. Some are friendlier to firewalls than others (HTTP and HTTPS), some allow interaction (SSH), etc.
| [reply] |
Just remembered that you may also use rlogin, and some people may shoot me in the head for mentioning this. rlogin is obsolete and poses a great security risk! However I've seen rlogin being used in quite a few places (for e.g. DB2 parallel installations use rlogin to execute commands).
| [reply] |
ssh can do everything rlogin can, but it's safer. One should stay away from rlogin unless commanded otherwise, and even then only after a fight.
| [reply] |
Hi,
As stated ikegami, you will need to run a server on the other side, which will launch/executes the other processes by forking/threading.
A simple example would be a daemon/webservice which listen on a given port, the cgi contact with this daemon and do RPC to instruct the remote process what program or actions to do. For communication between this two processes I would recommend you XML-RPC, it's very simple with the benefits that the information is xml -> text, so the debugging is very simple. If you need some security above this you could make the communication through a secure tunel.
Take a look at the website, there is a very good howto with code examples for the most used programming languages
I don't really know how complex is the thing you are creating, but if you have a Jabber server inside your company, or had think about using one, you could also use the Jabber server as a message-server for passing the RPC calls to the remote process that is online in the Jabber server, with the benefits that the process is like a service or client of the Jabber server, and having all the security/reliability that the Jabber server can give you... only a idea, but... could be interesting for you. So you can "talk" with the service/client as it were a human. ;-)
Regards,
|fire| at irc.freenode.net
| [reply] |
| [reply] |
my old sperl script is able to run simple perl scripts and one-liners on remote machines via ssh, i.e.:
$ sperl bugs,willy,hippo -e \
'chomp($h=`hostname`);print "hello from $h!!!\n"'
hello from bugs!!!
hello from willy!!!
hello from hippo!!!
| [reply] [d/l] |
The simplest way may indeed be the ssh command.
The disadvantage of it is that it may be slower than
other solutions.
| [reply] |
| [reply] |