Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good simple C/C++ FTP and SFTP client library recommendation for embedded Linux [closed]

Tags:

c++

c

linux

sftp

ftp

Could anyone recommend FTP / SFTP client C/C++ library for Linux-based embedded system? I know about Curl library but I need something as simple as possible just to download files from FTP / SFTP servers. Is there any recommendation to look for? Yes, SFTP support is critical. Actually I can even sacrifice multi-threading because I need only one stream at a time. And I'd like it to be able to work through memory buffers but this should be not a problem.

Thank you in advance.

UPDATE:
After spent some time with libcurl I decided not to go this way in favor of direct usage of libssh2 for SFTP and reuse proprietary FTP library from different project. libcurl seems too linked to curl command line tool approach. For example try to get remote file size before starting download operation - it was definitely not planned.

But actually another propositions are welcome especially I see no really simple good public C or C++ FTP client library at all. Everything is either very old and not supported or fresh and wet.

like image 553
Roman Nikitchenko Avatar asked May 27 '10 09:05

Roman Nikitchenko


People also ask

What is SFTP client and FTP client?

The key difference between FTP vs SFTP is that SFTP uses a secure channel to transfer files while FTP doesn't. With SFTP, your connection is always secured and the data that moves between your FTP client and your web server is encrypted.

Which popular tools are being used for FTP and SFTP communication?

FileZilla is a popular and mature FTP client software that supports FTP, FTPS, and SFTP. The “pro” version of FileZilla adds support for WebDAV and a variety of cloud storage providers (Amazon S3, Dropbox, etc.) as well.

What is a good SFTP client?

WinSCP. WinSCP is an excellent FTP and SFTP client for Windows. You can start copying files between a remote server and local computer using SFTP, FTP, WebDAV, SCP, or S3 protocols.


2 Answers

libssh2 is a great lib for SFTP - and it also happens to be the lib that (lib)curl uses for SFTP.

like image 149
Daniel Stenberg Avatar answered Sep 20 '22 00:09

Daniel Stenberg


Have you looked at libcurl's alternatives page? A few options there may provide an FTP solution.

I think if you move away from libcurl, you may need to use two different libraries, one for SFTP (which is really just SSH) and one for FTP.

However, if you do not want to do this, perhaps you want to look at compiling libcurl to link against cyaSSL or PolarSSL instead of openssl to make the installation more lightweight. You could also try to compile it with minimal options, as you only need FTP and SFTP support.

Hope this helps.

like image 25
jdbow75 Avatar answered Sep 21 '22 00:09

jdbow75