Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to set up a script on a Linux machine to download files from a server using FTPS, what options do I have?

share|improve this question

4 Answers 4

You could use lftp it handles ftps with ease and make a "lftp-script"


debug 10
open ftps://ftp.blah.org
get <yourfile>


lftp -f lftp-script

Or use lftpget:

lftpget ftps://user:password@ftp.blah.org/path/to/file.iso
share|improve this answer
+1 for lftp. IMO it's the best command-line ftp client around. –  cas Aug 28 '09 at 12:48

curl ftps://server.com/ or curl --ftp-ssl ftp://server.com/

share|improve this answer
If you can't install lftp, curl seems like the only option (it's usually included as a core utility on all major distros) –  Ray May 8 at 14:07



I think it is shipped with ncftp.

EDIT: My fault, not SFTP support I think. From the NCFTP FAQ:

Q. Does NcFTP support any secure FTP modes a la SFTP/SSL/SSH Tunnels?

A. NcFTP does not have any built-in support for encryption or secure FTP of any type. We do not support any type of interaction with hacks such as FTP over SSH tunnels. We may implement a secure FTP mode at a future date, but please do not ask for an ETA.

share|improve this answer

curlftps is your friend. It's awesome.

# emerge curlftps  (or apt-get, yum, whatever)

Then add this your fstab:

curlftpfs#myusername:mypassword@myhost.ca:/my/remote/path  /my/local/path  fuse  user,noauto,defaults,sslv3,no_verify_peer  0  0

Finally, just mount that directory on your local filesystem:

$ mount /my/local/path

And now you can cp or even rsync from one local dir to another.

share|improve this answer
I think you meant emerge curlftpfs –  Jon L. 10 hours ago

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.