PDA

View Full Version : make a ssh connection



ehsantlk
1st May 2015, 11:12
hi
I want to try to make a ssh connection with my qt app
but I do not know if there is any easy way to do this in qt or not

i saw http://doc.qt.digia.com/qtcreator-extending/utils.html
and it has SshConnection calss but I dont have any idea how can i use it
when i try #inlcude <utils> it give me there is no file or directory found

i'm new to qt .
thank you guy

jefftee
1st May 2015, 16:01
http://doc.qt.digia.com/qtcreator-extending/utils-sshconnection.html

After a little reading, this class is part of QtCreator source and not part of the Qt framework. You would have to manually cobble the bits out of QtCreator source code to attempt to use this in your own program, at least that's my understanding.

ehsantlk
2nd May 2015, 09:48
thank u
what u mean . can u explain a liitle more . u mean I should go to qt folders and find this file or..
sorry but i am new to qt . i know a little about it . by the way i'm using windows 7

jefftee
2nd May 2015, 20:39
Yes, you will have to download QtCreator source code and try to find the header and code and copy into your application. This is not part of the Qt framework libraries.

ehsantlk
2nd May 2015, 21:15
thank u so much dude
so . just copy header and cpp file in my project directory? shouldn't I add something in .pro file or any thing else?

jefftee
2nd May 2015, 21:22
I haven't done it myself, so you may have to use tools like grep or others to actually find where that class is found in QtCreator source/header files... i.e. It may or may not be in its own files named SshConnection.h and SshConnection.cpp.

You will be adding this to your own code, so other than HEADERS and SOURCES, I am not aware of anything else you would have to change in your .pro file.

Good luck!

ehsantlk
6th May 2015, 19:08
thank u . it was very helpfull
but i got another problem after compile i got this message :
"MYROJECT DIRECTORY"\ssh\sshcryptofacility_p.h:34: error: botan/botan.h: No such file or directory
#include <botan/botan.h>
^
i try to compile and using botan library using this tutorial : http://www.youtube.com/watch?v=VLYN99a2tKc
but I did not find botan.pro file in qt resource file . instead i find botan.pri . how can i make dll from it?
and how can i use botan and resolve my problem ?

wysota
6th May 2015, 19:24
https://www.libssh.org/

ehsantlk
16th May 2015, 21:43
thanks . it was helpful

bythe why . for botan include file problem . i should compile qssh library that botan is in it

jefftee
17th May 2015, 04:35
Sorry, I have no idea what botan is, but if it's a library, I would suggest that you try to get the botan library itself to compile/link successfully before you try to use in your application.