code: @Override
  	public boolean promptYesNo(String message) {
  		List<String> possibleValues = Arrays.asList(new String[] { "y", "n" });
  		message += " (y/n): ";
  		String line;
  
  		do {
  			line = new String(console.readLine(message));
  
  			if (line != null && !possibleValues.contains(line)) {
  				console.printf("Invalid selection");
  			}
  		} while (line == null || !possibleValues.contains(line));
  
  		return "y".equalsIgnoreCase(line);
  	}
docs: /* (non-Javadoc)
  @see org.apache.maven.wagon.providers.ssh.interactive.InteractiveUserInfo#promptYesNo(java.lang.String)