After trying tinkering with Net::SSH::Perl for awhile, I've come to the
conclusion that it's basically hopeless to get the high level interfaces
(including the open3 function) to cooperate well with POE. As they are
currently implemented, the blocking calls and/or the unhandled exceptions
are much too painful to work around. I started to rewrite Net::SSH::Perl to
be more friendly to POE, but I've since been stymied by the shear enormity
of the mechanics involved in the SSH protocol itself. 

Depending on what you are doing, it might be easier to just write a normal
POE client/server program and wrap it in an SSH tunnel vs. the other way
around. For the time being, I've related myself to using Wheel::Run and a
normal ssh client, which is okay as long as you don't fork a ton of
processes. Net::SSH::Perl requires a ton of support libraries, so I'm just
as happy that I don't have to deploy all those everywhere. One day I would
like to have see the POE socket factory have optional support for SSH (or
any other encryption) wrappers, but I don't know enough about POE internals
to be able to pull something like that off yet.

- MW 

-----Original Message-----
From: Molina, Gerardo [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 24, 2003 1:23 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: Non-blocking ssh and scp using POE

POE'rs:

I am looking at using POE for implementing non-blocking/parallelized ssh and
scp.  Has someone already created some POE components for doing this?  I did
a quick google search and saw that Mike Wilkinson had asked a similar
question about 8 months ago.  Has that effort culminated into some
ready-to-use modules or packages?

I am currently using Net::SSH::Perl, Net::SCP::Expect and Net::SCP.  But the
script I have now is serial (not parallel) and if it has a problem with a
server along the way, the whole script dies.  I'm hoping I can parallel this
script with POE and have it handle errors gracefully without terminating
entire script.

Thanks in advance,
Gerardo

Reply via email to