code: public void bySshWithEveryRetryWaitFor(int time, TimeUnit units) throws IOException {
          checkState(withEveryRetryWaitFor(time, units), "Port %s is not opened to connect to", hostAndPort.getPort());
  
          for (int i = 1; i <= retries; i++) {
              Connection connection = new Connection(hostAndPort.getHostText(), hostAndPort.getPort());
              try {
                  connection.connect(null, 0, sshTimeoutMillis, sshTimeoutMillis);
                  LOG.info("SSH port is open on {}:{}", hostAndPort.getHostText(), hostAndPort.getPort());
                  return;
              } catch (IOException e) {
                  LOG.error("Failed to connect to {}:{} (try {}/{}) - {}",
                          hostAndPort.getHostText(), hostAndPort.getPort(), i, retries, e.getMessage());
                  if (i == retries) {
                      throw e;
                  }
              } finally {
                  connection.close();
              }
              sleepFor(time, units);
          }
      }
docs: Connects to sshd on host:port
  Retries while attempts reached with delay
  First with tcp port wait, then with ssh connection wait
  
  @throws IOException if no retries left