public class DefaultConfigFileHostEntryResolver extends ConfigFileHostEntryResolver
~/.ssh/config
file of the user currently running the client, re-loading it if necessary. It also
(optionally) enforces the same permissions regime as OpenSSH
Modifier and Type | Field and Description |
---|---|
static DefaultConfigFileHostEntryResolver |
INSTANCE
The default instance that enforces the same permissions regime as
OpenSSH |
private boolean |
strict |
options, STRICTLY_PROHIBITED_FILE_PERMISSION
log
EMPTY
Constructor and Description |
---|
DefaultConfigFileHostEntryResolver(boolean strict) |
DefaultConfigFileHostEntryResolver(java.nio.file.Path path,
boolean strict,
java.nio.file.LinkOption... options) |
Modifier and Type | Method and Description |
---|---|
boolean |
isStrict() |
protected java.util.List<HostConfigEntry> |
reloadHostConfigEntries(java.nio.file.Path path,
java.lang.String host,
int port,
java.lang.String username) |
resolveEffectiveHost, resolveEffectiveResolver
checkReloadRequired, exists, getPath, lastModified, resetReloadAttributes, size, toPathResource, toPathResource, toString, updateReloadAttributes, validateStrictConfigFilePermissions
getSimplifiedLogger
public static final DefaultConfigFileHostEntryResolver INSTANCE
OpenSSH
private final boolean strict
public DefaultConfigFileHostEntryResolver(boolean strict)
strict
- If true
then makes sure that the containing folder has 0700 access and the file 0644.
Note: for Windows it does not check these permissionsModifiableFileWatcher.validateStrictConfigFilePermissions(Path, LinkOption...)
public DefaultConfigFileHostEntryResolver(java.nio.file.Path path, boolean strict, java.nio.file.LinkOption... options)
public final boolean isStrict()
true
then makes sure that the containing folder has 0700 access and the file 0644.
Note: for Windows it does not check these permissionsModifiableFileWatcher.validateStrictConfigFilePermissions(Path, LinkOption...)
protected java.util.List<HostConfigEntry> reloadHostConfigEntries(java.nio.file.Path path, java.lang.String host, int port, java.lang.String username) throws java.io.IOException
reloadHostConfigEntries
in class ConfigFileHostEntryResolver
java.io.IOException