I'm currently upgrading a tool which is a parallelized rsh for a cluster and want to include ssh connection in it. But the ssh code is huge and, as I don't want to loose too much time reading ssh code, I'd like to know if there is in ssh a C-function like rcmd, that opens a ssh connection and give in return a socket descriptor. Thanks -- Wilfrid Billot Laboratoire ID Tel.: 04 76 61 20 35 ZIRST - 51, avenue Jean Kuntzmann e-mail : wilfrid.billot at imag.fr 38330 Montbonnot Saint Martin Clustering, installation/setup : ka-tools.sourceforge.net
On Wed, Dec 12, 2001 at 10:20:20AM +0100, Wilfrid Billot wrote:> I'm currently upgrading a tool which is a parallelized rsh for a cluster > and want to include ssh connection in it. But the ssh code is huge and, > as I don't want to loose too much time reading ssh code, I'd like to > know if there is in ssh a C-function like rcmd, that opens a ssh > connection and give in return a socket descriptor.try to check what sftp does. or scp. they just run the ssh binary to create a secure connection. other than that, there is no rcmd-like API. -m
On Wed, 12 Dec 2001, Wilfrid Billot wrote:> I'm currently upgrading a tool which is a parallelized rsh for a cluster > and want to include ssh connection in it. But the ssh code is huge and, > as I don't want to loose too much time reading ssh code, I'd like to > know if there is in ssh a C-function like rcmd, that opens a ssh > connection and give in return a socket descriptor.pipe() fork() dup2() execl() See sftp.c for an example. -d -- | By convention there is color, \\ Damien Miller <djm at mindrot.org> | By convention sweetness, By convention bitterness, \\ mindrot.org | But in reality there are atoms and space - Democritus (c. 400 BCE)