Class DefaultConfigFileHostEntryResolver
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.io.ModifiableFileWatcher
org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver
org.apache.sshd.client.config.hosts.DefaultConfigFileHostEntryResolver
- All Implemented Interfaces:
HostConfigEntryResolver
Monitors the
~/.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-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefaultConfigFileHostEntryResolverThe default instance that enforces the same permissions regime asOpenSSHprivate final booleanFields inherited from class ModifiableFileWatcher
options, STRICTLY_PROHIBITED_FILE_PERMISSIONFields inherited from class AbstractLoggingBean
logFields inherited from interface HostConfigEntryResolver
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionDefaultConfigFileHostEntryResolver(boolean strict) DefaultConfigFileHostEntryResolver(Path path, boolean strict, LinkOption... options) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanisStrict()protected List<HostConfigEntry> reloadHostConfigEntries(Path path, String host, int port, String username, String proxyJump) Methods inherited from class ConfigFileHostEntryResolver
resolveEffectiveHost, resolveEffectiveResolverMethods inherited from class ModifiableFileWatcher
checkReloadRequired, exists, getPath, lastModified, resetReloadAttributes, size, toPathResource, toPathResource, toString, updateReloadAttributes, validateStrictConfigFilePermissions
-
Field Details
-
INSTANCE
The default instance that enforces the same permissions regime asOpenSSH -
strict
private final boolean strict
-
-
Constructor Details
-
DefaultConfigFileHostEntryResolver
public DefaultConfigFileHostEntryResolver(boolean strict) - Parameters:
strict- Iftruethen makes sure that the containing folder has 0700 access and the file 0644. Note: for Windows it does not check these permissions- See Also:
-
DefaultConfigFileHostEntryResolver
-
-
Method Details
-
isStrict
public final boolean isStrict()- Returns:
- If
truethen makes sure that the containing folder has 0700 access and the file 0644. Note: for Windows it does not check these permissions - See Also:
-
reloadHostConfigEntries
protected List<HostConfigEntry> reloadHostConfigEntries(Path path, String host, int port, String username, String proxyJump) throws IOException - Overrides:
reloadHostConfigEntriesin classConfigFileHostEntryResolver- Throws:
IOException
-