You could always use Expect. See http://expect.nist.gov/ for info.
--
Gregor Mosheh
[EMAIL PROTECTED]
Systems Admin, Humboldt Internet
707.825.4638
On Tue, 4 Jan 2000, Leo Wierzbowski wrote:
> Hello,
>
> I read the ssh faq, searched deja.com and google.com, and read the past
> month's ssh newsgroup postings before I sent this one.
>
> I can execute ssh from my C program, to run a program on a remote host and
> then disconnect (e.g., system(ssh host /path/pgm). Now I need to execute
> ssh such that the connection to the remote host stays open while the
> program on the remote host reads stdin for its input. This works OK when I
> use the keyboard to ssh host /path/pgm, but when I popen for writing it
> appears that stdin is not receiving anything. I've read that ssh1 might
> only communicate via tty device, and ignore stdin from popen. If you know
> how to pipe to ssh, please post or email me. I would greatly appreciate
> it. Thanks.
>
> Sincerely,
> Leo Wierzbowski
>
> "One day the South will know that when these disinherited
> children of God sat down at lunch counters they were in
> reality standing up for the best in the American dream and
> the most sacred values in our Judaeo-Christian heritage, and
> thusly, carrying our whole nation back to those great wells
> of democracy which were dug deep by the founding fathers in
> the formulation of the Constitution and the Declaration of
> Independence." (Letter from Birmingham Jail, April 1963).
> Some more Dr. King quotes:
> http://grove.ufl.edu/~leo/mlk.html
>
> "The University of Florida does not endorse
> or disendorse the content of this document.
> It is the author's private opinion."
>
>