executing multiple commands

  • Anona Mouse
    Anona Mouse

    The getting started file that comes with the SSHtools documentation says: "There is a drawback to this in that the process environment is not passed on from one session to another, so you cannot for example execute a command to change directory and then another to execute a script in that directory, since the change directory is lost when the session closes and the new command starts back in the default working directory."

    Unfortunately, my program needs to be able to connect to a remote server, execute a command, parse the result, and then execute more commands based on that result.  Essentially, I want my program to be able to interact with a remote shell, which requires executing a series of commands.  Is there a way to do this using SSHtools?