develooper Front page | perl.beginners | Postings from April 2023

Re: help with making an sftp connection

Thread Previous | Thread Next
From:
Uri Guttman
Date:
April 17, 2023 04:50
Subject:
Re: help with making an sftp connection
Message ID:
3d04b049-9970-09d8-d391-fe185f69e810@perlhunter.com
On 4/17/23 00:46, Brent Wood via beginners wrote:
> Cheers Jim,
>
> I have already found that resource and tried a few ways to make it 
> work, but it always seems to invoke public/private key authentication, 
> which is not available on the remote system
>
>
> my perl is:
>
> /my %args = (
>          user => '$user',
>          password => '$password',
> /

you seem to be quoting the variables which will not use their values. 
drop the quotes on all single vars and try it it again/

/
> /         ssh_args => {
>              user => '$user',
>              password => '$password',
>              protocol=>'2,1',
>              debug => 1,
>          }
>     );
>
> my $sftp=Net::SFTP->new($server, %args)
>     or die "could not open connection to $server\n";/

uri

-- 
https://uriguttman.blogspot.com/
A Long Strange Trip
A blog about computers, food, my life and silliness.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About