How to implement SFTP with Qt / QNetworkAccessManager (C ++)

I am new to Qt and I would like to implement FTP and SFTP support for my software. As I googled, I found that there is no sftp library for Qt, but this should be possible with QNetworkAccessManager. Then I tried to figure out how to create my own protocol or something like that, but did not understand how to do it.

Does anyone know how I can do this?

Thanks Michael

+6
source share
2 answers

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

I dedicated a library containing SSH and SFTP, and I created a new project called QSsh on Github. The goal of the project is to provide SSH and SFTP support for any Qt application.

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

I hope it will be useful

+5
source

Each protocol requires a special implementation. But we can create a class like QHttp that does this. There are several protocols that have similar semantic, but not all. So, if you want to write it, tell me and I will help you.

+1
source

Source: https://habr.com/ru/post/893125/


All Articles