The ssh command line command prompts the user for a password like so:

Password:

In C, when I do:

```
system("ssh name@host");
system("password");

```

the command line will prompt the user and ignore any input coming from my program. It seems to always take input that's typed by the user. Is there a way to redirect output that I'm putting to stdout and pipe it into the password prompt for ssh?

I've tried a variety of things, from above to treating ssh as a file pointer like so:

```
FILE *ssh = popen("ssh -t -t -S -o StrictHostKeyChecking=no name@host", "w");

```

and then writing to that file pointer but none seem to work.