in reply to Problem with Net::SSH::Perl and threads
And if you really need stderr separated from stdout, you will have to implement it at a lower level than the backquotes (I will show you how to do it if you want).sub mydate { my $out = `ssh $host -i fxfer.key date 2>&1`; print "[$id] out: $out\n"; print "[$id] exit: $?\n"; }
Lately, I have been working in Net::OpenSSH that can do almost anything Net::SSH::Perl does (and much more!). It uses OpenSSH under the hood, instead of its own implementation of the Secure Shell protocol... though it is still very alpha and does not work on Windows.
Using Net::SSH2 can be another good option.
|
|---|