code: @Override
      public String sendCommand2(String command) throws IOException {
          String str = null;
          SshConnection ssh = null;
          try {
              ssh = SshConnectionFactory.getConnection(config.getGerritHostName(),
                      config.getGerritSshPort(), config.getGerritProxy(), config.getGerritAuthentication());
              str = ssh.executeCommand(command);
          } catch (Exception ex) {
              throw new IOException("Error during sending command", ex);
          } finally {
              if (ssh != null) {
                  ssh.disconnect();
              }
          }
          return str;
      }
docs: Runs a command on the gerrit server and returns the output from the command.
  @param command the command.
  @return the output of the command, or null if something went wrong.
  @throws IOException if error.