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 DefaultConfigFileHostEntryResolver
The default instance that enforces the same permissions regime asOpenSSH
private final boolean
Fields inherited from class org.apache.sshd.common.util.io.ModifiableFileWatcher
options, STRICTLY_PROHIBITED_FILE_PERMISSION
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields inherited from interface org.apache.sshd.client.config.hosts.HostConfigEntryResolver
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultConfigFileHostEntryResolver
(boolean strict) DefaultConfigFileHostEntryResolver
(Path path, boolean strict, LinkOption... options) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
isStrict()
protected List<HostConfigEntry>
reloadHostConfigEntries
(Path path, String host, int port, String username, String proxyJump) Methods inherited from class org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver
resolveEffectiveHost, resolveEffectiveResolver
Methods inherited from class org.apache.sshd.common.util.io.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
- Iftrue
then 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
true
then 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:
reloadHostConfigEntries
in classConfigFileHostEntryResolver
- Throws:
IOException
-