Interface SshCommand


public interface SshCommand
Describes an SSH command, which can be run or canceled.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels a running command, usually in response to the SSH client disconnecting.
    int
    run()
    Runs the command, returning its exit code.
  • Method Details

    • cancel

      void cancel()
      Cancels a running command, usually in response to the SSH client disconnecting.
    • run

      int run() throws IOException
      Runs the command, returning its exit code. 0 (zero) indicates the command ran successfully, and any other value (positive or negative) indicates failure.
      Returns:
      the result of the command, with 0 meaning success and any other value meaning failure
      Throws:
      IOException - may be thrown by implementations