Easiest way to do FTP without the module?

J

John Doe

I am actually doing sftp (secure FTP) and have given up trying to
build the sftp perl module on AIX; it is a lost cause. Net-FTP would
be a breeze, but no unencrypted connection is allowed. :-(

I can open an sftp session manually, so that is working. I am
wondering what would be the easiest way to run it from perl.
(Expect.pm? <--have never used. R. Schwartz has said that Expect.pm
is often doing it the hard way.) Does anyone know another CPAN module
that could apply?

I want to be able to list files in the sftp session, store that list
o' files in an array for processing, fetch and remove some of the
files, etc.

Any suggestions?

Off topic, but related: Does anyone know where to find more info on
using the "-b batchfile" option of sftp mentioned on the sftp man
page?
 
G

Gregory Toomey

John said:
I am actually doing sftp (secure FTP) and have given up trying to
build the sftp perl module on AIX; it is a lost cause. Net-FTP would
be a breeze, but no unencrypted connection is allowed. :-(
\
An alternative is to use scp (secure copy) instead. Its part of the ssh
suite.

gtoomey
 
C

ChrisO

John said:
I am actually doing sftp (secure FTP) and have given up trying to
build the sftp perl module on AIX; it is a lost cause. Net-FTP would
be a breeze, but no unencrypted connection is allowed. :-(

I can open an sftp session manually, so that is working. I am
wondering what would be the easiest way to run it from perl.
(Expect.pm? <--have never used. R. Schwartz has said that Expect.pm
is often doing it the hard way.) Does anyone know another CPAN module
that could apply?

I want to be able to list files in the sftp session, store that list
o' files in an array for processing, fetch and remove some of the
files, etc.

Any suggestions?

Off topic, but related: Does anyone know where to find more info on
using the "-b batchfile" option of sftp mentioned on the sftp man
page?

I once had to write a large Perl script running on Windows NT 4.0 that
did A LOT of FTP'ing using a Perl that didn't have Net::FTP available.
I ended up writing my own FTP module (called NTFTP.pm) that duplicated
most of the methods in Net::FTP, providing a consistent interface.

The underpinnings were highly inefficient, but it worked (using "manual
FTP command line"; I hoped the inefficiencies would highlight my demand
to the company at the time that we get on a more recent and better
version of ASPN.) You are welcome to a copy if you think it would
provide you with any ideas for something similar (eg. SFTP.pm). Reply
here with a spam-proof, obsfucated email address and I can send it to you.

-ceo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top