Re: Calling ssh from C-Program with execvp

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()) {
} 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