in reply to How can I pass an open session of Net::SSH2 to a script running in a forked subprocess?
This is relatively easy to do with Net::OpenSSH.
For instance, the following command will run a remote command through ssh and attach it to a local command (a la dpipe(1)):
my $ssh = Net::OpenSSH->new($host); my $pid = $ssh->spawn({stdinout_dpipe => \@local_child_cmd}, @remote_command);
|
---|
In Section
Seekers of Perl Wisdom