diff --git a/lib/Bric/Util/Trans/SFTP.pm b/lib/Bric/Util/Trans/SFTP.pm index f35337fd1..f438389f8 100644 --- a/lib/Bric/Util/Trans/SFTP.pm +++ b/lib/Bric/Util/Trans/SFTP.pm @@ -129,7 +129,7 @@ sub put_res { next unless $server->is_active; # Connect via SSH2 and establish SFTP channel. - my $ssh2 = _connect($server); + my $ssh2 = _connect_to($server); my $sftp = $ssh2->sftp; my $doc_root = $server->get_doc_root; my $hn = $server->get_host_name; @@ -221,7 +221,7 @@ sub del_res { next unless $server->is_active; # Connect via SSH2 and establish SFTP channel. - my $ssh2 = _connect($server); + my $ssh2 = _connect_to($server); my $sftp = $ssh2->sftp; my $doc_root = $server->get_doc_root; my $hn = $server->get_host_name; @@ -260,7 +260,7 @@ NONE. =over 4 -=item _connect +=item _connect_to Establishes an SSH2 connection. @@ -272,7 +272,7 @@ sub _connect_to { my $hn = $server->get_host_name; my $ssh2 = Net::SSH2->new; - $ssh2->connect(split /:/ => $hn) or trow_gen( + $ssh2->connect(split /:/ => $hn) or throw_gen( error => "Error connecting to '$hn' via SSH2", payload => join ' ', $ssh2->error, );