From: Chris Sharp Date: Fri, 3 Feb 2023 18:45:09 +0000 (-0500) Subject: latest changes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2ae76ef416c57a0def7b6c355c24716a951971ea;p=working%2FEvergreen.git latest changes --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/RemoteAccount.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/RemoteAccount.pm index 0b3e0cd1ae..50a7700ae1 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/RemoteAccount.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/RemoteAccount.pm @@ -6,6 +6,7 @@ use OpenSRF::Utils::Logger qw/:logger/; use Data::Dumper; use IO::Pty; use Net::FTP; +use Net::OpenSSH; use Net::SFTP::Foreign; use File::Temp; use File::Basename; @@ -53,7 +54,7 @@ OpenILS::Utils::RemoteAccount - Encapsulate FTP, SFTP and SSH file transactions =head1 DESCRIPTION The Remote Account module attempts to transfer a file to/from a remote server. -Either Net::FTP or Net::SSH2 is used. +Net::FTP, Net::OpenSSH or Net::SFTP::Foreign is used. =head1 PARAMETERS @@ -365,6 +366,13 @@ sub glob_parse { # Internal Mechanics +sub _sftp { + +} + +sub _openssh { + +} #sub _ssh2 { # my $self = shift; @@ -425,20 +433,20 @@ sub glob_parse { # } # return; #} -# -#sub auth_ssh2_args { -# my $self = shift; -# my %auth_args = ( -# privatekey => shift, -# publickey => shift, -# rank => [qw/ publickey hostbased password /], -# ); -# $self->remote_user and $auth_args{username} = $self->remote_user ; -# $self->remote_password and $auth_args{password} = $self->remote_password; -# $self->remote_host and $auth_args{hostname} = $self->remote_host ; -# return %auth_args; -#} -# + +sub auth_openssh_args { + my $self = shift; + my %auth_args = ( + privatekey => shift, + publickey => shift, + rank => [qw/ publickey hostbased password /], + ); + $self->remote_user and $auth_args{username} = $self->remote_user ; + $self->remote_password and $auth_args{password} = $self->remote_password; + $self->remote_host and $auth_args{hostname} = $self->remote_host ; + return %auth_args; +} + #sub put_ssh2 { # my $self = shift; # my $keys = shift; # could have many keypairs here