Execute process after SSH into vagrant server

Using a java class, I'm attempting to launch a vagrant server and then execute a python script that lives inside of a virtual box (vagrant). The reason I am doing it this way is because I need to create integration / automated tests that live in the project, but outside of the main code base (so that my tests are not run in prod). I will need to send APIs and web services custom data and then execute the app via the python script to validate test scenarios.

As of now, when I attempt to execute the final command, the python script, via process, or process builder, I get the following:

vagrant up - works fine vagrant ssh - works fine python script - error: java.io.IOException: Cannot run program "script": error=2, No such file or directory

My code:

public static void launchCommandlineProcess(String command, String arg) {
    String line = null;
    ProcessBuilder processBuilder = new ProcessBuilder();
    Process process = null;
    try {
        System.out.println("Executing command line process...");
        process = processBuilder.command(command, arg).start();
        try {
            InputStreamReader inputStreamReader = new 
    InputStreamReader(process.getInputStream());
            final BufferedReader reader = new 
    BufferedReader(inputStreamReader);
            while ((line = reader.readLine()) != null) {
                System.out.println(line);
            }
            reader.close();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
    catch (Exception e) {
        e.printStackTrace();
    }
    finally {
        process.destroy();
        System.out.println("Destroyed processes");
    }
}

After I ssh into the vagrant / virtual box server, I cannot execute the python script. I tried searching for something along these lines before posting, but couldn't find anything helpful.

Any advice?

I have tried using process.Runtime.getRuntime.exec(), as well as process builder. I have tried putting my commands into a String array and executing them all in a row. I have tried creating a new process in the same method that executes the python script directly after the ssh is done, and before the ssh process is destroyed. No luck.

Any advice is greatly appreciated. Thank you.

Note: These commands work fine from the terminal, outside of java code.