Subject: | scp program |
Date: | Tue, 20 Jan 2009 17:29:12 -0500 |
To: | bug-Net-SSH-Perl [...] rt.cpan.org |
From: | John Payne <john [...] sackheads.org> |
In order to use a Net::SSH::Perl script as a program to scp (ie scp -
S my_perl_script) there's a "bug" in SSH1.pm.
We need stdin to get attached to the interactive part... but we're
also not going to set stdin on the cmd() invocation.
*** SSH1.pm.OLD Tue Jan 20 21:50:58 2009
--- SSH1.pm Tue Jan 20 21:51:25 2009
***************
*** 278,284 ****
}
$ssh->debug("Entering interactive session.");
! $ssh->_start_interactive(1);
my($stdout, $stderr, $exit) =
map $ssh->{"_cmd_$_"}, qw( stdout stderr exit );
--- 278,284 ----
}
$ssh->debug("Entering interactive session.");
! $ssh->_start_interactive(defined $stdin ? 1 : 0);
my($stdout, $stderr, $exit) =
map $ssh->{"_cmd_$_"}, qw( stdout stderr exit );