Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compression zlib can not be set #7

Closed
ghost opened this issue Oct 10, 2012 · 3 comments
Closed

Compression zlib can not be set #7

ghost opened this issue Oct 10, 2012 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 10, 2012

Setting zlib compression client <-> server and vice versa does not work.

Try this snippet:

#!/usr/bin/perl

use strict;
use warnings;

use Net::SSH2; #

my $server   = 'myserver.org'; #change to your own server for your needs!
my $user     = 'meomy';
my $password = 'ThIsIsYuRpaZZwurd';

my $ssh2     = Net::SSH2->new();
$ssh2->connect($server, 22) or die $!;

$ssh2->auth_password($user,$password);

$ssh2->method('COMP_CS', 'zlib');
print "COMP_CS is ", $ssh2->method('COMP_CS');
$ssh2->method('COMP_SC', 'zlib');
print "COMP_SC is ", $ssh2->method('COMP_SC');
$ssh2->disconnect();

ssh2->method('COMP_CS') and ssh2->method('COMP_SC') always shows none

Tested with Debian 6.06 / libssh2 1.4.2-1.1 / openssh 6.0p1-3

@lsiden
Copy link

lsiden commented Nov 20, 2012

I'm having this same problem. Please let me know if you found a solution.

@salva
Copy link
Collaborator

salva commented Nov 6, 2013

zlib compression is broken on the current stable version of libssh2. Fixed in dev.

@jamessan
Copy link
Contributor

libssh2 with compression fixes has been released and the net-ssh2 changes to support the compression API have been merged. The compression support can be enabled as below

my $ssh = Net::SSH2->new();
$ssh->connect($host, $port, Compress => 1);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants