|
Sorry about that. For the fatal error I ran it in a place that had some other die handler running I
+ didn't know about. The following is from a standard environment.
I execute this code...
use Net::SFTP::Foreign;
my $sftp = Net::SFTP::Foreign->new(
host => 'sftp.myhost.com',
user => 'user',
more => [qw(-v -i /home/user/.ssh/my_priv_key)]
);
$sftp->error and die "SSH connection failed: " . $sftp->error;
using this command...
perl -T SFTPTest.pl
and I get this error msg...
SSH connection failed: Connection to remote server is broken at SFTPTest.pl line 9.
When I use this command...
perl SFTPTest.pl
it works fine.
Sorry for the confusion!
Thanks.
|