void substitute(String originalHostName, int port, String userName, String localUserName, File home) { int p = port >= 0 ? port : positive(getValue(SshConstants.PORT)); if (p < 0) { p = SshConstants.SSH_DEFAULT_PORT;
private int getNumberOfPasswordPrompts(HostConfigEntry hostConfig) { String prompts = hostConfig .getProperty(SshConstants.NUMBER_OF_PASSWORD_PROMPTS); if (prompts != null) { prompts = prompts.trim(); int value = positive(prompts); if (value > 0) { return value; } log.warn(format(SshdText.get().configInvalidPositive, SshConstants.NUMBER_OF_PASSWORD_PROMPTS, prompts)); } // Default for NumberOfPasswordPrompts according to // https://man.openbsd.org/ssh_config return 3; }
void substitute(String originalHostName, int port, String userName, String localUserName, File home) { int p = port >= 0 ? port : positive(getValue(SshConstants.PORT)); if (p < 0) { p = SshConstants.SSH_DEFAULT_PORT;
int p = port >= 0 ? port : positive(entry.getValue(SshConstants.PORT)); config.setPort(p >= 0 ? p : SshConstants.SSH_DEFAULT_PORT); config.setProperty(SshConstants.PORT,