in reply to Turn off stdout in Net::SSH::Perl

This has the effect that the remote script can not use the output of the Linux executed commands for error checking as stdout is directed to 'local.script'.
Not likely. Does the same happen if you use a non-perl ssh client?

Replies are listed 'Best First'.
Re^2: Turn off stdout in Net::SSH::Perl
by cstrong (Beadle) on Sep 02, 2008 at 13:59 UTC
    Anonymous Monk, thanks for your input. It got me thinking and I created a shell script with a one liner in it:
    output=`ssh root@172.17.194.60 /u/remote.script`;
    This also failed, but several print statements in remote.script showed that my back ticked line was not being executed at all! I then created a simple perl one-liner on the remote machine and noted that this worked if I ran it remotely from my shell script.
    $result=`/bin/ls -l /u/tns/`;
    Then the answer struck me...my remote.script did not have the full path in front of DB_COMPILE. Once this was inserted everything worked perfectly!
    $result1=`/u/DB_COMPILE $from $to`;
    This has been bugging me for ages, so thanks for making me think again and setting me off in the right direction!