I know that if you are writting a C or C++ program, using the system(char *) function will send commands to the terminal command line. What I was wondering is how one could go about makeing a program that will launch another shell and then output its commands to that. For ex. If I write
system("ssh random.address.here");
system("commands to go to new ssh shell here");
The second command will only be executed outside of the ssh. So does anyone know how to make it so that the second line would send commands to the newly opened ssh?
system("ssh random.address.here");
system("commands to go to new ssh shell here");
The second command will only be executed outside of the ssh. So does anyone know how to make it so that the second line would send commands to the newly opened ssh?