« SSH session loggingRename file via scripted FTP »

ftps with lftp

08/11/09

Permalink 07:04:05 am, by admin Email , 137 words   English (US)
Categories: Linux

ftps with lftp

lftp support ftps (different from sftp). ftps is ftp over an explicit TLS (SSL) connection. We've seen a few sites running MS IIS that require ftps and getting lftp to work has been tricky. To make it work verify that your lftp build has gnutls support compiled in with:

lftp -v

This build does not:

Libraries used: Readline 5.1, Expat 1.95.8, OpenSSL 0.9.8d 28 Sep 2006

Here's one that does:

Libraries used: Readline 5.1, Expat 1.95.8, GnuTLS 2.6.6, zlib 1.2.3

Once you have have TLS support in your lftp build then you can put a file with something like this:

lftp -c 'open -e "set ftps:initial-prot ""; \
   set ftp:ssl-force true; \
   set ftp:ssl-protect-data true; \
   put test.txt; " \
   -u "USERNAME","PASSWORD" \
   ftps://HOSTNAME:990 '

The option sets are critical as lftp wants to do "PROT C" by default but Windows wants to see "PROT P".

1 comment

Comment from: Colin Brett [Visitor]
*****
This was very useful, thanks.

I had been trying to find out if lftp supplied in RHEL5.3 supported TLS. The lftp -v command indicated it wasn't, so I've compiled the latest lftp software from scratch and now I can see ftps is available.

This has saved quite a lot of headaches.

Thanks,
Colin
11/26/09 @ 10:13

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
July 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution