use Data::Dumper;
use IO::Pty;
use Net::FTP;
+use Net::OpenSSH;
use Net::SFTP::Foreign;
use File::Temp;
use File::Basename;
=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
# Internal Mechanics
+sub _sftp {
+
+}
+
+sub _openssh {
+
+}
#sub _ssh2 {
# my $self = shift;
# }
# 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