curl-library
Re: Invoking remote operations by ssh ...
Date: Wed, 24 Oct 2007 16:29:52 -0300
Hi Ralph,
The idea is to make the application independent of external tools. I would
like to install my software and no more else to get all things working.
I don't know if I'm worrying about an irrelevant question but, at the same
time, I am curious about how to achieve this funcionality programmatically.
Thanks,
Sandro
On 10/24/07, Ralph Mitchell <ralphmitchell_at_gmail.com> wrote:
>
> On 10/24/07, Sandro Andrade <sandro.andrade_at_gmail.com> wrote:
> >
> > Hi Dan,
> >
> > I need to execute commands for start up network services and reload
> > configuration files, so I think the SFTP commands will not suffice.
> >
> > doesn't libcurl supports a conventional ssh command invocation ?
> >
> > If no, do you recommend some other library for invoke ordinary remote
> > operations ?
>
> I guess we don't understand exactly why you can't remote-execute the
> commands using the regular ssh command, as in:
>
> ssh <somehost> <somecommand>
>
> If you need to do this from within a program, why not use something like:
>
> system("ssh somehost somecommand");
>
> or fork-and-exec with appropriate duplication of stdin/stdout/stderr
> for the parent to read any output. Standard C-library stuff.
>
> Ralph Mitchell
>
-- Sandro Santos Andrade -------------------------------------------------------- Distributed Systems Laboratory (LaSiD) Computer Science Department (DCC) Federal University of Bahia BrazilReceived on 2007-10-24