[Ssh-sftp-perl-users] Problem with ssh-2 and stdin bigger than 32k
Brought to you by:
dbrobins
|
From: Enrique de A. S. <enr...@pc...> - 2006-04-10 13:04:57
|
Hi everybody,
I have a litle problem when using Net::SSH::Perl. I try to execute a
remote command which requires stdin. When stdin is bigger than 32k, cmd
method hangs up. I'm using ssh-2 protocol, but when I use ssh-1 it goes
well, both with stdin sizes smaller than 32k and bigger then 32k.
The code I'm running is the following:
my $ssh;
eval {
$ssh = Net::SSH::Perl->new(
$host,
protocol => 2,
compression => 1,
interactive => 0,
debug => 1,
);
};
die "Cannot connect to host.\n" if ($@);
eval {
$ssh->login($user, $pass);
};
die "Cannot authenticate against host.\n" if ($@);
my $stdin = "something";
my ($stdout, $stderr, $exit) = $channel->cmd("cat - > myfile", $stdin);
Could someone help me to make it work with stdin bigger than 32k?
Thanks in advance,
Enrique.
|