in reply to Net::SFTP::Foreign new constructor won't accept "more=>['-v']"
#!/usr/bin/perl use strict; use warnings; use Net::SSH2; use Net::SFTP::Foreign; use Net::SFTP::Foreign::Backend::Net_SSH2; my $host = 'localhost'; my $user = 'user'; my $pass = 'password'; my $ssh2 = Net::SSH2->new(); $ssh2->debug(1); $ssh2->connect($host) or die "Connect failed!\n"; $ssh2->auth_password($user, $pass) or die "password auth failed\n"; my $sftp = Net::SFTP::Foreign->new(ssh2 => $ssh2, backend => 'Net_SSH2'); $sftp->error and die "Unable to establish a SFTP connection: ", $sftp->error; $sftp->get('/root/foo.txt', '/root/foo2.txt');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SFTP::Foreign new constructor won't accept "more=>['-v']"
by syphilis (Archbishop) on Dec 26, 2010 at 12:05 UTC |