PDA

View Full Version : Qt and SCP



Vash5556
20th February 2007, 16:32
I was curious if it was possible to use Qt for using scp within a program for transferring files between two computers. If possible how might i go about trying to implement this? any help would be greatly appreciated.

-Vash

jpn
20th February 2007, 16:35
I was curious if it was possible to use Qt for using scp within a program for transferring files between two computers. If possible how might i go about trying to implement this? any help would be greatly appreciated.
You can use QProcess to start external programs.

Vash5556
20th February 2007, 16:41
You can use QProcess to start external programs.

Thank you so much for the help. That was a very interesting class that i overlooked.

fullmetalcoder
20th February 2007, 17:47
AFAIK you could also implement a SCP socket in Qt... It may need some rather extended knowledge of networking in genral and SCP in particular but I'm pretty sure that it's possible. See the Simple chat example given with Qt. It shows how reimplementing a QAbstractSocket to make it work using a custom networking protocol.

wysota
20th February 2007, 20:07
The problem is SCP works over SSH, so you'd have to implement SSH first. And to implement SSH you'd have to implement SSL :) So it's probably easier to call scp through QProcess ;)

vfernandez
21st February 2007, 11:44
You may link your program to libssh (http://www.0xbadc0de.be/libssh:libssh) and use the SFTP functions it includes. I'm using it in my program and it works nice. Feel free to ask me any questions. I'm in the libssh mailing list (http://www.cerkinfo.be/cgi-bin/mailman/listinfo/libssh) so you may ask there. If you need it, I can send you the class I use as a wrapper for libssh in my project, as long as your code is GPL.