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 connect, open a channel, write the command to the channel, but read
the output is not working :(


-----Original Message-----
From: Peter Stuge [mailto:pe...@stuge.se] 
Sent: sexta-feira, 6 de Fevereiro de 2009 22:52
To: libssh2-devel@lists.sourceforge.net
Subject: Re: [libssh2] execute remote command and get result

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
> the result.

Doing that will be 50-100 lines of C code. If you don't want to learn
a lot about C for this project maybe you could use some of the
bindings that are available? I think there are bindings for both PHP
and Python, for example.


//Peter

----------------------------------------------------------------------------
--
Create and Deploy Rich Internet Apps outside the browser with
Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code
to
build responsive, highly engaging applications that combine the power of
local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to