Package org.apache.sshd.common.config
Class ConfigFileReaderSupport
- java.lang.Object
-
- org.apache.sshd.common.config.ConfigFileReaderSupport
-
public final class ConfigFileReaderSupport extends Object
- Author:
- Apache MINA SSHD Project
- See Also:
- ssh_config(5)
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
parseBooleanValue(String v)
static Properties
readConfigFile(BufferedReader rdr)
Reads the configuration file contents into aProperties
instance.static Properties
readConfigFile(InputStream input, boolean okToClose)
static Properties
readConfigFile(Reader reader, boolean okToClose)
static Properties
readConfigFile(URL url)
static Properties
readConfigFile(Path path, OpenOption... options)
static String
yesNoValueOf(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 String COMPRESSION_PROP
- See Also:
- Constant Field Values
-
DEFAULT_COMPRESSION
public static final String DEFAULT_COMPRESSION
-
MAX_SESSIONS_CONFIG_PROP
public static final 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 String PUBKEY_AUTH_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_PUBKEY_AUTH
public static final 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 String PASSWORD_AUTH_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_PASSWORD_AUTH
public static final 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 String KBD_INTERACTIVE_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_KBD_INTERACTIVE_AUTH
public static final 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 String PREFERRED_AUTHS_CONFIG_PROP
- See Also:
- Constant Field Values
-
LISTEN_ADDRESS_CONFIG_PROP
public static final String LISTEN_ADDRESS_CONFIG_PROP
- See Also:
- Constant Field Values
-
DEFAULT_BIND_ADDRESS
public static final String DEFAULT_BIND_ADDRESS
- See Also:
- Constant Field Values
-
PORT_CONFIG_PROP
public static final String PORT_CONFIG_PROP
- See Also:
- Constant Field Values
-
KEEP_ALIVE_CONFIG_PROP
public static final 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 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 String AUTH_KEYS_FILE_CONFIG_PROP
- See Also:
- Constant Field Values
-
MAX_AUTH_TRIES_CONFIG_PROP
public static final 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 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 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 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 String CIPHERS_CONFIG_PROP
- See Also:
- Constant Field Values
-
MACS_CONFIG_PROP
public static final String MACS_CONFIG_PROP
- See Also:
- Constant Field Values
-
KEX_ALGORITHMS_CONFIG_PROP
public static final String KEX_ALGORITHMS_CONFIG_PROP
- See Also:
- Constant Field Values
-
HOST_KEY_ALGORITHMS_CONFIG_PROP
public static final String HOST_KEY_ALGORITHMS_CONFIG_PROP
- See Also:
- Constant Field Values
-
LOG_LEVEL_CONFIG_PROP
public static final 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 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 String SUBSYSTEM_CONFIG_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
readConfigFile
public static Properties readConfigFile(Path path, OpenOption... options) throws IOException
- Throws:
IOException
-
readConfigFile
public static Properties readConfigFile(URL url) throws IOException
- Throws:
IOException
-
readConfigFile
public static Properties readConfigFile(InputStream input, boolean okToClose) throws IOException
- Throws:
IOException
-
readConfigFile
public static Properties readConfigFile(Reader reader, boolean okToClose) throws IOException
- Throws:
IOException
-
readConfigFile
public static Properties readConfigFile(BufferedReader rdr) throws IOException
Reads the configuration file contents into aProperties
instance. 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
- TheBufferedReader
for reading the file- Returns:
- The read properties
- Throws:
IOException
- If failed to read or malformed content
-
parseBooleanValue
public static boolean parseBooleanValue(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 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
-
-