Bug#560867: can't write to remote files lines longer than 27441 chars

Bartosz Fenski aka fEnIo fenio at debian.org
Sat Dec 12 22:18:57 UTC 2009


Package: libnet-ssh2-perl
Version: 0.28-1
Severity: normal

Can't find anything about these limits in documentation so I'm submitting
this bugreport.

I tried to write some script and everything worked fine until I tried to
send some long line.

Here goes my script:

#!/usr/bin/perl -W

use strict;
use Fcntl;
use warnings FATAL => qw (all);
use Net::SSH2;

my $ssh2 = Net::SSH2->new();
$ssh2->connect('hostname') or die $!;
$ssh2->auth_password('fenio','password');
my $sftp = $ssh2->sftp();
my $remote = $sftp->open('/home/fenio/foo.txt', O_WRONLY | O_CREAT | O_TRUNC);

print $remote "A" x 27442;

Sending 27441 characters works fine.

Even with $ssh2->debug(1) there's no information what's wrong.

If I should use it other way then it should be stated in documentation.

regards
fEnIo

-- 
  ,''`.  Bartosz Fenski | mailto:fenio at debian.org | pgp:0x13fefc40 | irc:fEnIo
 : :' :       32-050 Skawina - Glowackiego 3/15 - malopolskie v. - Poland
 `. `'           phone:+48602383548 | proud Debian maintainer and user
   `-            http://fenski.pl | xmpp:fenio at jabber.org | rlu:172001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20091212/3e321729/attachment.pgp>


More information about the pkg-perl-maintainers mailing list