code: public void connect(String username, char[] password) {
          doConnect(() -> {
              return CommandContextFactory.getInstance().
                      newCommandContext(new CommandContextConfiguration.Builder()
                      .setUsername(username)
                      .setPassword(password)
                      .setErrorOnInteract(false)
                      .build());
          });
      }
docs: Connect to the server using the default host and port.
  
  @param username The user name for logging in.
  @param password The password for logging in.