curl-library
Re: Invoking remote operations by ssh ...
Date: Wed, 24 Oct 2007 14:11:28 -0500
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
Received on 2007-10-24