
david at kineticode
Nov 27, 2009, 3:07 AM
Post #5 of 6
(853 views)
Permalink
|
On Nov 26, 2009, at 1:52 AM, Iván Chavero wrote: > The problem is in the $sftp_args function, i've modified it for my > actual version (1.10.3) but i'll modify the svn version during the day > and send the patch to the list > > > > here's the function for 1.10.3 And here is the patch for 1.11.x. Would someone try this out, please. --- a/lib/Bric/Util/Trans/SFTP.pm +++ b/lib/Bric/Util/Trans/SFTP.pm @@ -133,13 +133,13 @@ sub put_res { # Instantiate a Net::SSH2 object and login. - (my $hn = $s->get_host_name) =~ s/:\d+$//; + my ($hn, $port) = split /:/, $s->get_host_name; my $user = $s->get_login; my $password = $s->get_password; my $ssh2 = Net::SSH2->new(); my $connect = eval { - $ssh2->connect($hn); + $ssh2->connect($hn, $port); $ssh2->method('CRYPT_CS', SFTP_MOVER_CYPHER ) if SFTP_MOVER_CIPHER; $ssh2->auth( username => $user, password => $password ); }; @@ -266,13 +266,13 @@ sub del_res { next unless $s->is_active; # Instantiate a Net::SSH2 object and login. - (my $hn = $s->get_host_name) =~ s/:\d+$//; + my ($hn, $port) = split /:/, $s->get_host_name; my $user = $s->get_login; my $password = $s->get_password; my $ssh2 = Net::SSH2->new(); my $connect = eval { - $ssh2->connect($hn); + $ssh2->connect($hn, $port); $ssh2->method('CRYPT_CS', SFTP_MOVER_CYPHER ) if SFTP_MOVER_CIPHER; $ssh2->auth( username => $user, password => $password ); }; Thanks, David
|