Ssh , sftp , ftp qt libraries
-
hi,
i'm writing a gui application , of the inputs for the application is ip username password .
i want to be able to ssh to the given ip and run some scripts on that ip , and send/receive files .
is there any library in qt that can help me ? if not is there any library that i can link with my project ?
im writing in c++ .thank you .
-
You want to use something like the QNetworkAccessManager classe??
"Network access doc":http://qt-project.org/doc/qt-4.8/qnetworkaccessmanager.html -
In addition to Jeroentje@home suggestion:
"libssh":http://www.libssh.org/ is for ssh, sftp access.
They say that KDE uses it so you can integrate it into Qt app.There is "QFtp class":http://qt-project.org/doc/qt-4.8/qftp.html#details but for Qt4
-
[quote author="andreyc" date="1408547366"]In addition to Jeroentje@home suggestion:
"libssh":http://www.libssh.org/ is for ssh, sftp access.
They say that KDE uses it so you can integrate it into Qt app.
[/quote]Wow this is really nice and well documented , thank you .
-
Ok , i downloaded libssh-0.5.0.exe from the website and linked the ssh.lib with my project and included the libssh.h .
and i just wrote this (below) to try it, but i get :
[quote]
Starting C:\Users\saeed\build-ACS_tool-Desktop_Qt_5_3_MSVC2013_OpenGL_32bit-Debug\debug\ACS_tool.exe...
The program has unexpectedly finished.
C:\Users\saeed\build-ACS_tool-Desktop_Qt_5_3_MSVC2013_OpenGL_32bit-Debug\debug\ACS_tool.exe crashed
[/quote]My code , is simple created a form put on it a push button and defined for it the onclick() :
[quote]
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <stdlib.h>
#include "libssh.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}MainWindow::~MainWindow()
{
delete ui;
}void MainWindow::on_pushButton_clicked()
{
ssh_session my_ssh_session;
my_ssh_session = ssh_new();}
[/quote]the code compiles with no error , and if i comment the function on_pushButton_clicked() the program runs with crashing , what could be the problem , because i cant even debug it .