I am trying to SSH into a remote machine, and run a .ksh file on a that machine to run a Java program.
If SSH into the machine with a tool like Putty, and run this command:
cd /folder/folder/examples; ksh runexample.ksh NameOfClass methodName
The Java program runs its full course, sending some data, putting it into an outside database, and displaying a response. However, if I try to SSH into the machine from the command line on another machine, like so:
/usr/bin/ssh firstname.lastname@example.org "cd /folder/folder/examples; ksh runexample.ksh NameOfClass methodName;"
The program doesn't execute fully. It doesn't give me any errors, but it simply returns notification that the class files were loaded successfully, the first line of the Java program is displayed, then it quits without sending a request or receiving a response.
What are the differences in my two approaches? Any idea of what would be causing this?