in reply to SCP help

Hello, there are perl modules for this kind of job, e.g. Net::SFTP::Foreign, Net::SSH2. Maybe these modules help you to integrate ssh better into your perl scripts.

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});

Replies are listed 'Best First'.
Re^2: SCP help
by salva (Canon) on May 03, 2010 at 10:57 UTC
    ... and Net::OpenSSH that being on an Unix OS, maybe Linux, it's probably the easiest one to install and use for SCP file copy.
    use Net::OpenSSH; my $ssh = Net::OpenSSH->new('root@foo.bar.com', passwd => $passwd, port => 223); $ssh->scp_put("/home/my/local/file/whatever.txt", "/my/remote/path_name");