Re: [libssh2] execute remote command and get result

2009-02-06 Thread Peter Stuge
Maverick wrote: > I can connect, open a channel, write the command to the channel, > but read the output is not working :( If you will be using a shell you may want to implement a fake terminal in your client. You may want to look into the exec channel type. //Peter ---

Re: [libssh2] execute remote command and get result

2009-02-06 Thread Maverick
Hi, I'm using C/C++, already have a lot of code for my project done. The only thing that I've not done yet to complete my project is the remote command execution via ssh. I've already tried to see the examples that came with libssh2, but I can't figure it out wow to do what I need :( I can conn

Re: [libssh2] Upload error with curl scp on Windows

2009-02-06 Thread Markus Moeller
"Markus Moeller" wrote in message news:gmi9el$hi...@ger.gmane.org... >I did some more debug. Here are my questions: > > Normal: > Curl_write calls Curl_scp_send > > MMM Curl_scp_send after libssh2_channel_write len/nwrite 16384/16384 > MMM Curl_write after Curl_scp_send len/nwrite 16384

Re: [libssh2] execute remote command and get result

2009-02-06 Thread Peter Stuge
Maverick wrote: > Hi, is there anyone that can help me out with a simple code to > exectute a remote command via ssh and get de output of the command: > > something like this > > r=ssh2_exec(ls -l); > > printf ("%s\n",r); > > and also check for timeout when executing the command and reading > t

Re: [libssh2] Upload error with curl scp on Windows

2009-02-06 Thread Markus Moeller
I did some more debug. Here are my questions: Normal: Curl_write calls Curl_scp_send MMM Curl_scp_send after libssh2_channel_write len/nwrite 16384/16384 MMM Curl_write after Curl_scp_send len/nwrite 16384/16384 MMM Curl_scp_send after libssh2_channel_write len/nwrite 16384/16384 MMM

[libssh2] libssh2_userauth_publickey_fromfile won't work with passphrase

2009-02-06 Thread llyzs
Hi, I am planning to use libssh2's port forwarding feature in my project (http://grdc.sourceforge.net). I ran into a problem. I was successfully authenticated with the SSH server using libssh2_userauth_password and libssh2_userauth_publickey_fromfile with empty passphrase. However, when I tr

[libssh2] execute remote command and get result

2009-02-06 Thread Maverick
Hi, is there anyone that can help me out with a simple code to exectute a remote command via ssh and get de output of the command: something like this r=ssh2_exec(ls -l); printf ("%s\n",r); and also check for timeout when executing the command and reading the result. ---