public class DefaultConfigFileHostEntryResolver extends ConfigFileHostEntryResolver
~/.ssh/config
file of the user currently running
the server, re-loading it if necessary. It also (optionally) enforces the same
permissions regime as OpenSSH
does for the file permissions.Modifier and Type | Field and Description |
---|---|
static DefaultConfigFileHostEntryResolver |
INSTANCE
The default instance that enforces the same permissions regime as
OpenSSH |
options, STRICTLY_PROHIBITED_FILE_PERMISSION
log
EMPTY
Constructor and Description |
---|
DefaultConfigFileHostEntryResolver(boolean strict) |
DefaultConfigFileHostEntryResolver(File file,
boolean strict) |
DefaultConfigFileHostEntryResolver(Path path,
boolean strict,
LinkOption... options) |
Modifier and Type | Method and Description |
---|---|
boolean |
isStrict() |
protected List<HostConfigEntry> |
reloadHostConfigEntries(Path path,
String host,
int port,
String username) |
resolveEffectiveHost, resolveEffectiveResolver
checkReloadRequired, exists, getPath, lastModified, resetReloadAttributes, size, toString, updateReloadAttributes, validateStrictConfigFilePermissions
public static final DefaultConfigFileHostEntryResolver INSTANCE
OpenSSH
public DefaultConfigFileHostEntryResolver(boolean strict)
strict
- If true
then makes sure that the containing folder
has 0700 access and the file 0600. Note: for Windows it
does not check these permissionspublic DefaultConfigFileHostEntryResolver(File file, boolean strict)
public DefaultConfigFileHostEntryResolver(Path path, boolean strict, LinkOption... options)
public final boolean isStrict()
protected List<HostConfigEntry> reloadHostConfigEntries(Path path, String host, int port, String username) throws IOException
reloadHostConfigEntries
in class ConfigFileHostEntryResolver
IOException
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.