Re: Calling ssh from C-Program with execvp
- From: "Richard E. Silverman" <res@xxxxxxxx>
- Date: 21 Jan 2007 13:28:38 -0500
This program works for me:
---------------------------------------------------------------
#include <stddef.h>
#include <sys/types.h>
#include <sys/wait.h>
main ()
{
int status;
char *argv[] = {"ssh","remote_host","echo","foo",NULL};
if (fork()) {
wait(&status);
} else {
execvp("/usr/bin/ssh", argv);
}
}
---------------------------------------------------------------
Since the log shows successful authentication, something is happening
during the login. Try -n in case something waiting for input, as well as
-v as Doug suggested. Also, you might try putting aside any shell init
files on the remote side.
--
Richard Silverman
res@xxxxxxxx
.
- Follow-Ups:
- Re: Calling ssh from C-Program with execvp
- From: Manfred Rebentisch
- Re: Calling ssh from C-Program with execvp
- From: Sensei
- Re: Calling ssh from C-Program with execvp
- From: Manfred Rebentisch
- Re: Calling ssh from C-Program with execvp
- References:
- Calling ssh from C-Program with execvp
- From: Manfred Rebentisch
- Calling ssh from C-Program with execvp
- Prev by Date: Re: Calling ssh from C-Program with execvp
- Next by Date: Re: Calling ssh from C-Program with execvp
- Previous by thread: Re: Calling ssh from C-Program with execvp
- Next by thread: Re: Calling ssh from C-Program with execvp
- Index(es):
Relevant Pages
|