1

I'm writing a bash script which automates the downloading of files from an FTP server depending on certain conditions.

For testing I need to be able to connect to an FTP server, list the files there, upload and download the files. I tried searching for public FTP servers which would let me connect to them using sftp command but to no avail.

Is there a lightweight FTP server that I can install on my own computer, and connect to it through the command line as if it were a real world scenario?

Kindly keep in mind before answering that I haven't installed any FTP server before, so I would really appreciate a detailed answer.

Thank you!

  • FTP or SFTP? They're completely different protocols. SFTP was called this way because its commands are similar to FTP, but it isn't an additional layer to FTP or anything close like this, not like HTTPS with HTTP. – Gilles 'SO- stop being evil' Mar 16 '17 at 23:38
  • @Gilles I need SFTP protocol to connect to the FTP server. – RodrikTheReader Mar 17 '17 at 6:25
  • You can't use the SFTP protocol to connect to an FTP server. They're different protocols. Some FTP servers support FTPS, but that's a different protocols. Many but not all clients support both. – Gilles 'SO- stop being evil' Mar 17 '17 at 10:20
2

If you insist on using sftp, you need install sshd (the ssh server demon), because sftp works over the ssh-protocol and is not really an ftp program in the original sense. It's just a more ftp-like interface that works similarly to scp etc.

If you want to use real ftp, the "classic" client is usually called ftp and the "classic" server is called ftpd. Try these first, if you are not content, play around with the alternatives like vsftp (more lightweight, but with security restrictions you have to pay attention).

If you are looking at the alternatives, keep in mind that TFTP as used by tftp is again a different protocol (trivial file transfer program, simplified compared to FTP).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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