[Qt-interest] qt sockets vs native sockets and libssh2

Pritam Ghanghas pritam_ghanghas at infosys.com
Wed Jan 12 06:56:03 CET 2011


On Tue, 2011-01-11 at 20:13 +0530, Andreas Pakulat wrote:
> On 11.01.11 14:05:50, Christian Gagneraud wrote:
> > On 01/11/2011 12:51 PM, Dmitry Teslenko wrote:
> > > Hello!
> > > I'm trying to get ssh port forwarding with libssh2 and qt4 gui on win32
> > > platform.
> > > SSH library provides usable example with native sockets and I have
> > > problem adapt that code for qt sockets.
> > > libssh2 works fine with native sockets work and stucks on data transfer
> > > with qt sockets. I guess there's some kind of restriction in libssh2 or
> > > in qt that I dont' aware of and I need your help.
> > 
> > Why don't you don't simply fork a SSH process (using QProcess) that do 
> > the port forwarding for you?
> 
> Because then he cannot supply a password or passphrasse to ssh unless his
> application is always run from a terminal. And even then its very strange
> for a GUI app to ask for password/passphrase on the terminal it was started
> from. Hence libssh2 usage which has a hook to provide a custom way to ask
> the user for this information.
> 
I think he can. QProcess allows reading stdout of the process and
writing to stdin. Though not a clean thing to do, he can read stdout of
the process and if its asking for password write to stdin.

 
-- 
Thanks,
Pritam


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***



More information about the Qt-interest-old mailing list