Net-SFTP-Foreign-Backend-Net_SSH2
view release on metacpan or search on metacpan
lib/Net/SFTP/Foreign/Backend/Net_SSH2.pm view on Meta::CPAN
$auth_args{publickey} = "$auth_args{privatekey}.pub";
}
my $host = $auth_args{hostname};
defined $host or croak "sftp target host not defined";
my $port = delete $opts->{port} || 22;
%$opts and return;
unless (defined $auth_args{username}) {
local $SIG{__DIE__};
$auth_args{username} = eval { scalar getpwuid $< };
defined $auth_args{username} or croak "required option 'user' missing";
}
$ssh2 = $self->{_ssh2} = Net::SSH2->new();
$debug and $debug & 131072 and $ssh2->debug(1);
unless ($ssh2->connect($host, $port)) {
$self->_conn_failed($sftp, "Connection to remote host $host failed");
return;
}
( run in 0.253 second using v1.01-cache-2.11-cpan-8d75d55dd25 )