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

Re: help with making an sftp connection

Thread Previous | Thread Next
From:
Jim Gibson via beginners
Date:
April 16, 2023 22:55
Subject:
Re: help with making an sftp connection
Message ID:
E15B1DC3-84C4-4D73-964A-0BEE82A734D8@icloud.com
Perl has a repository of user-submitted modules called Comprehensive Perl Archive Network (CPAN). Net::SFTP::Foreign can be installed from there, and it looks like a good candidate, as does Net::SFTP. The two modules use different methods for invoking the SFTP protocol. I would try one and, if that doesn’t work, the other. You can also search CPAN for other FTP and SFTP modules. Most modules come with their own documentation and sample code. See this link for Net::STFP::Foreign: 

<https://metacpan.org/pod/Net::SFTP::Foreign>

Try what that gives you, and come back here if you have any specific questions or problems. It is always good to give it a try for yourself before asking for help. Post what you try.


> On Apr 16, 2023, at 2:40 PM, Brent Wood via beginners <beginners@perl.org> wrote:
> 
> Hi,
> 
> I'm not a perl coder, (though have written a few very simple Perl scripts when necessary) but now I need to write a Perl script to transfer specified files from one computer to another. I have scribbled out a script a while back using FTP, but now need to use SFTP. I can re-use most of the old FTP code/logic, but need some help to make the actual connection.
> 
> It is a secure (no external connectivity) network, with no public/private key security available, so authentication just via user/password
> 
> Some Googling for how I might do this in Perl has thrown up several possibilities, more confusing than informative, so I'm not sure how to best do this.
> 
> It looks like Net::SFTP::Foreign might best fit my needs, but I'm open to suggestions.
> 
> 
> Advice or a code snippet on how to make the connection should be enough, and much appreciated!!
> 
> 
> 
> Thanks,
> 
> Brent Wood

Jim Gibson
jim@gibson.org




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