Package org.apache.sshd.common.config
Class ConfigFileReaderSupport
- java.lang.Object
-
- org.apache.sshd.common.config.ConfigFileReaderSupport
-
public final class ConfigFileReaderSupport extends java.lang.Object- See Also:
- ssh_config(5)
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description privateConfigFileReaderSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanparseBooleanValue(java.lang.String v)static java.util.PropertiesreadConfigFile(java.io.BufferedReader rdr)Reads the configuration file contents into aPropertiesinstance.static java.util.PropertiesreadConfigFile(java.io.InputStream input, boolean okToClose)static java.util.PropertiesreadConfigFile(java.io.Reader reader, boolean okToClose)static java.util.PropertiesreadConfigFile(java.net.URL url)static java.util.PropertiesreadConfigFile(java.nio.file.Path path, java.nio.file.OpenOption... options)static java.lang.StringyesNoValueOf(boolean flag)Returns a "yes" or "no" value based on the input parameter
-
-
-
Field Detail
-
COMMENT_CHAR
public static final char COMMENT_CHAR
- See Also:
- Constant Field Values
-
COMPRESSION_PROP
public static final java.lang.String COMPRESSION_PROP
- See Also:
- Constant Field Values
-
DEFAULT_COMPRESSION
public static final java.lang.String DEFAULT_COMPRESSION
-
MAX_SESSIONS_CONFIG_PROP
public static final java.lang.String MAX_SESSIONS_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_MAX_SESSIONS
public static final int DEFAULT_MAX_SESSIONS
- See Also:
- Constant Field Values
-
PUBKEY_AUTH_CONFIG_PROP
public static final java.lang.String PUBKEY_AUTH_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_PUBKEY_AUTH
public static final java.lang.String DEFAULT_PUBKEY_AUTH
- See Also:
- Constant Field Values
-
DEFAULT_PUBKEY_AUTH_VALUE
public static final boolean DEFAULT_PUBKEY_AUTH_VALUE
-
PASSWORD_AUTH_CONFIG_PROP
public static final java.lang.String PASSWORD_AUTH_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_PASSWORD_AUTH
public static final java.lang.String DEFAULT_PASSWORD_AUTH
- See Also:
- Constant Field Values
-
DEFAULT_PASSWORD_AUTH_VALUE
public static final boolean DEFAULT_PASSWORD_AUTH_VALUE
-
KBD_INTERACTIVE_CONFIG_PROP
public static final java.lang.String KBD_INTERACTIVE_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_KBD_INTERACTIVE_AUTH
public static final java.lang.String DEFAULT_KBD_INTERACTIVE_AUTH
- See Also:
- Constant Field Values
-
DEFAULT_KBD_INTERACTIVE_AUTH_VALUE
public static final boolean DEFAULT_KBD_INTERACTIVE_AUTH_VALUE
-
PREFERRED_AUTHS_CONFIG_PROP
public static final java.lang.String PREFERRED_AUTHS_CONFIG_PROP
- See Also:
- Constant Field Values
-
LISTEN_ADDRESS_CONFIG_PROP
public static final java.lang.String LISTEN_ADDRESS_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_BIND_ADDRESS
public static final java.lang.String DEFAULT_BIND_ADDRESS
- See Also:
- Constant Field Values
-
PORT_CONFIG_PROP
public static final java.lang.String PORT_CONFIG_PROP
- See Also:
- Constant Field Values
-
KEEP_ALIVE_CONFIG_PROP
public static final java.lang.String KEEP_ALIVE_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_KEEP_ALIVE
public static final boolean DEFAULT_KEEP_ALIVE
- See Also:
- Constant Field Values
-
USE_DNS_CONFIG_PROP
public static final java.lang.String USE_DNS_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_USE_DNS
public static final boolean DEFAULT_USE_DNS
- See Also:
- Constant Field Values
-
AUTH_KEYS_FILE_CONFIG_PROP
public static final java.lang.String AUTH_KEYS_FILE_CONFIG_PROP
- See Also:
- Constant Field Values
-
MAX_AUTH_TRIES_CONFIG_PROP
public static final java.lang.String MAX_AUTH_TRIES_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_MAX_AUTH_TRIES
public static final int DEFAULT_MAX_AUTH_TRIES
- See Also:
- Constant Field Values
-
MAX_STARTUPS_CONFIG_PROP
public static final java.lang.String MAX_STARTUPS_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_MAX_STARTUPS
public static final int DEFAULT_MAX_STARTUPS
- See Also:
- Constant Field Values
-
LOGIN_GRACE_TIME_CONFIG_PROP
public static final java.lang.String LOGIN_GRACE_TIME_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_LOGIN_GRACE_TIME
public static final long DEFAULT_LOGIN_GRACE_TIME
-
KEY_REGENERATE_INTERVAL_CONFIG_PROP
public static final java.lang.String KEY_REGENERATE_INTERVAL_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_REKEY_TIME_LIMIT
public static final long DEFAULT_REKEY_TIME_LIMIT
-
CIPHERS_CONFIG_PROP
public static final java.lang.String CIPHERS_CONFIG_PROP
- See Also:
- Constant Field Values
-
MACS_CONFIG_PROP
public static final java.lang.String MACS_CONFIG_PROP
- See Also:
- Constant Field Values
-
KEX_ALGORITHMS_CONFIG_PROP
public static final java.lang.String KEX_ALGORITHMS_CONFIG_PROP
- See Also:
- Constant Field Values
-
HOST_KEY_ALGORITHMS_CONFIG_PROP
public static final java.lang.String HOST_KEY_ALGORITHMS_CONFIG_PROP
- See Also:
- Constant Field Values
-
LOG_LEVEL_CONFIG_PROP
public static final java.lang.String LOG_LEVEL_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_LOG_LEVEL
public static final LogLevelValue DEFAULT_LOG_LEVEL
-
SYSLOG_FACILITY_CONFIG_PROP
public static final java.lang.String SYSLOG_FACILITY_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_SYSLOG_FACILITY
public static final SyslogFacilityValue DEFAULT_SYSLOG_FACILITY
-
SUBSYSTEM_CONFIG_PROP
public static final java.lang.String SUBSYSTEM_CONFIG_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
readConfigFile
public static java.util.Properties readConfigFile(java.nio.file.Path path, java.nio.file.OpenOption... options) throws java.io.IOException- Throws:
java.io.IOException
-
readConfigFile
public static java.util.Properties readConfigFile(java.net.URL url) throws java.io.IOException- Throws:
java.io.IOException
-
readConfigFile
public static java.util.Properties readConfigFile(java.io.InputStream input, boolean okToClose) throws java.io.IOException- Throws:
java.io.IOException
-
readConfigFile
public static java.util.Properties readConfigFile(java.io.Reader reader, boolean okToClose) throws java.io.IOException- Throws:
java.io.IOException
-
readConfigFile
public static java.util.Properties readConfigFile(java.io.BufferedReader rdr) throws java.io.IOExceptionReads the configuration file contents into aPropertiesinstance. Note: multiple keys value are concatenated using a comma - it is up to the caller to know which keys are expected to have multiple values and handle the split accordingly- Parameters:
rdr- TheBufferedReaderfor reading the file- Returns:
- The read properties
- Throws:
java.io.IOException- If failed to read or malformed content
-
parseBooleanValue
public static boolean parseBooleanValue(java.lang.String v)
- Parameters:
v- Checks if the value is "yes", "y", "on", "t" or "true".- Returns:
- The result - Note:
null/empty values are interpreted asfalse - See Also:
PropertyResolverUtils.TRUE_VALUES
-
yesNoValueOf
public static java.lang.String yesNoValueOf(boolean flag)
Returns a "yes" or "no" value based on the input parameter- Parameters:
flag- The required state- Returns:
- "yes" if
true, "no" otherwise
-
-