Net::SCP::Expect is a wrapper for scp that allows passwords via Expect.
SYNOPSIS
Example 1 - uses login method, longhand scp:
my $scpe = Net::SCP::Expect->new;
$scpe->login('user name', 'password');
$scpe->scp('file','host:/some/dir');
Example 2 - uses constructor, shorthand scp:
my $scpe = Net::SCP::Expect->new(host=>'host', user=>'user', password=>'xxxx');
$scpe->scp('file','/some/dir'); # 'file' copied to 'host' at '/some/dir'
Example 3 - Copying from remote machine to local host
my $scpe = Net::SCP::Expect->new(user=>'user',password=>'xxxx');
$scpe->scp('host:/some/dir/filename','newfilename');
See the scp() method for more information on valid syntax.
This module is simply a wrapper around the scp call. The primary difference between this module and Net::SCP is that you may send a password programmatically, instead of being forced to deal with interactive sessions.
Product's homepage
Requirements:
· Expect 1.14
· Term::ReadPassword
· Perl