Re: [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 15:52:01
|
Yes, I call several times to cmd method (I use ssh-2 to avoid authenticate against server each time I call this method). I have been investigating more about what can be the problem... having in mind the example code that I sent previously, if I execute it and I connect manually to the remote server, I see that 'myfile' has been created correctly, but if I do a ps, I see that cat command still running. It is like no EOF has been sent! Any idea? Thanks, Enrique. Matthew J. Salerno wrote: > Is it a series of commands you are executing? > > --- Enrique de Andres Saiz > <enr...@pc...> wrote: > > >>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. >> >> >> > > ------------------------------------------------------- > >>This SF.Net email is sponsored by xPML, a >>groundbreaking scripting language >>that extends applications into web and mobile media. >>Attend the live webcast >>and join the prime developer group breaking into >>this new coding territory! >> > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > >>_______________________________________________ >>Ssh-sftp-perl-users mailing list >>Ssh...@li... >> > > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > |