in reply to Re: instantiating an SFTP object
in thread instantiating an SFTP object
Thanks for the suggestion. This module seems to have a lot of functionality, so I definitely thought the try worth the effort. I'm calling it differently now and get a different error:
Permission denied (publickey,password). object created, back in main
sub get_ftp_object{ use strict; use Net::SFTP::Foreign; use 5.01; my $sub_hash = "my_sftp"; my $domain = $config{$sub_hash}->{'domain'}; my $username = $config{$sub_hash}->{'username'}; my $password = $config{$sub_hash}->{'password'}; my $port = 22; #dial up the server say "values are $domain $username $password"; my $sftp = Net::SFTP::Foreign->new( $domain, user => $username, port => $port, password => $password) or die "Can't connect: $!\n"; return $sftp; }
I seem to have gotten farther but don't understand why I didn't die here, as execution goes back to main. (?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: instantiating an SFTP object
by salva (Canon) on Jun 10, 2017 at 10:55 UTC | |
by Aldebaran (Curate) on Jun 13, 2017 at 02:06 UTC |