in reply to Re^3: cpan module to do stuff remotely
in thread cpan module to do stuff remotely

Hi Thomas,

Ok, I can see what it's doing. Thanks for the sample code.

It looks great if I could use it. It's exactly how I would like to operate, but I have no way of getting through the remote firewall, the machine could be in a hotel or a hospital with a wireless router and also no way of port-forwarding my connection to the remote machine.

So I think it needs to be *pulled* by the remote host. My local machine, also behind a router/firewall, then needs to post a file or files on a convenient server, the remote host will regularly check the server, download and execute the code.

So it's really only the my($stdout, $stderr, $exit) = $ssh->cmd( "cat /dev/universe" ); bit that I want.

So I probably need to use Net::FTP to download the file(s) according to some sort of schedule. And then maybe IPC::RunExternal for each line.

What do you think?

Thanks for your input.

Regards

Steve.

Replies are listed 'Best First'.
Re^5: cpan module to do stuff remotely
by thomas895 (Deacon) on Jun 06, 2012 at 06:57 UTC

    I have no way of getting through the remote firewall
    That is a network issue that you will have to work out with your network admin, or if that is you, figure out on your router. That, however, is out of this forum's scope.

    What do you think?
    Well, I don't know. If that accomplishes your goal, then that is the way to go. And don't limit yourself to Perl. Sometimes, cron can be a better and more reliable alternative, plus it is built in to your OS. On Windoze, you would use the task scheduler or what have you.
    On an unrelated side note: Windoze is terrible for programming anything useful on.

    ~Thomas~
    confess( "I offer no guarantees on my code." );

      On an unrelated side note: Windoze is terrible for programming anything useful on.

      Never heard of it, I get plenty done on NT5