Howto implement SFTP with Qt/QNetworkAccessManager (C++)

Michael Weibel picture Michael Weibel · Jul 20, 2011 · Viewed 8.8k times · Source

I'm new to Qt and I would like to implement FTP and SFTP support for my software. As I googled I discovered that there doesn't exist a sftp library for Qt but it should be possible with QNetworkAccessManager. I tried then to discover on how to build a custom protocol or something like that but didn't figure out how to do it.

Does someone know how I could do that?

Thanks, Michael

Answer

Paglian picture Paglian · Nov 23, 2012

There is no support for SFTP in Qt SDK but Qt Creator implements SFTP.

I have isolated the library that contains SSH and SFTP and I have created a new project named QSsh in Github. The aim of the project is to provide SSH and SFTP support for any Qt Application.

I have written an example on how to upload a file using SFTP. Take a look at examples/SecureUploader/

I hope it might be helpful