I want to ssh from a linux machine to another machine, log-on and issue some commands, then send command output back to my original machine.
I've thought about system("ssh ...; pwd; various commands") under C. But problem is that it only executes the ssh and leave the pwd and beyond. The semi-colon way does way in local machine but when you ssh it seems not working.
Besides, the result of executing at remote side need to echo back. Solving the problem under C is desired, and not to use system() to execute a script.
My another guess is thus to use popen or something similar.
Thanks a lot~