SshdSessionFactories.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | SshdSessionFactoryBuilder.
A factory interface for creating a |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final SshdSessionFactoryBuilder. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public SshdSessionFactory | Returns: theSshdSessionFactoryto use for caching ssh keys; may be cache)null if no caching
is desired.Builds a |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderreturning a supplier)File for the SSH config file to use, or
returning null if no config file is to be usedSets a function that returns the SSH config file, given the SSH directory. |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto set factorySets a factory for the |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderConnectorFactory to useSets an explicit |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto get the default private key files supplier)Sets a function that returns the default private key files, given the SSH directory. |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto get the default private key files provider)Sets a function that returns the default private keys, given the SSH directory. |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto get the default known hosts files supplier)Sets a function that returns the default known hosts files, given the SSH directory. |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto use; may be homeDirectory)null, in which case the home directory
as defined by FS. is assumedSets the home directory to use for |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto create a factory)KeyPasswordProviderSets a factory function to create a |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuildercomma-separated list of authentication mechanism names; if
authentications)null or empty, the default as specified by
SshdSessionFactory#getDefaultPreferredAuthentications()
will be usedSets the default preferred authentication mechanisms to use for
|
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto use proxyDataFactory)Sets the |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto create a factory)ServerKeyDatabaseSets a function that creates a new |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderto use; may be sshDirectory)null, in which case ".ssh" under the
home directory is assumedSets the SSH directory to use for |
| public SshdSessionFactoryBuilder | Returns: thisSshdSessionFactoryBuilderRemoves a previously set |
| state | back to summary |
|---|---|
| private final SshdSessionFactoryBuilder. | |
| SshdSessionFactoryBuilder | back to summary |
|---|---|
| public SshdSessionFactoryBuilder() | |
| build | back to summary |
|---|---|
| public SshdSessionFactory build(KeyCache cache) Builds a
Different
| |
| setConfigFile | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setConfigFile(Function<File, File> supplier) Sets a function that returns the SSH config file, given the SSH
directory. The function may return
| |
| setConfigStoreFactory | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setConfigStoreFactory(SshdSessionFactoryBuilder. Sets a factory for the
| |
| setConnectorFactory | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setConnectorFactory(ConnectorFactory factory) Sets an explicit
If not set, the created
| |
| setDefaultIdentities | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setDefaultIdentities(Function<File, List<Path>> supplier) Sets a function that returns the default private key files, given the SSH
directory. If not set or explicitly set to
| |
| setDefaultKeysProvider | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setDefaultKeysProvider(Function<File, Iterable<KeyPair>> provider) Sets a function that returns the default private keys, given the SSH
directory. If not set or explicitly set to
| |
| setDefaultKnownHostsFiles | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setDefaultKnownHostsFiles(Function<File, List<Path>> supplier) Sets a function that returns the default known hosts files, given the SSH
directory. If not set or explicitly set to
| |
| setHomeDirectory | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setHomeDirectory(File homeDirectory) Sets the home directory to use for
| |
| setKeyPasswordProvider | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setKeyPasswordProvider(Function<CredentialsProvider, KeyPasswordProvider> factory) Sets a factory function to create a
| |
| setPreferredAuthentications | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setPreferredAuthentications(String authentications) Sets the default preferred authentication mechanisms to use for
| |
| setProxyDataFactory | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setProxyDataFactory(ProxyDataFactory proxyDataFactory) Sets the
| |
| setServerKeyDatabase | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setServerKeyDatabase(BiFunction<File, File, ServerKeyDatabase> factory) Sets a function that creates a new
| |
| setSshDirectory | back to summary |
|---|---|
| public SshdSessionFactoryBuilder setSshDirectory(File sshDirectory) Sets the SSH directory to use for
| |
| withDefaultConnectorFactory | back to summary |
|---|---|
| public SshdSessionFactoryBuilder withDefaultConnectorFactory() Removes a previously set
| |
SshConfigStore.
| Modifier and Type | Method and Description |
|---|---|
| public SshConfigStore | create(File
to use for ~-replacements homeDir, File to use, may be configFile, String null if nonename of the current user in the local OS localUserName)Creates a |
| create | back to summary |
|---|---|
| public SshConfigStore create(File homeDir, File configFile, String localUserName) Creates a
| |
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv SshdSessionFactoryBuilder. | |
| pack-priv Function | |
| pack-priv ConnectorFactory | |
| pack-priv boolean | |
| pack-priv Function | |
| pack-priv Function | |
| pack-priv File | |
| pack-priv Function | |
| pack-priv Function | |
| pack-priv String | |
| pack-priv ProxyDataFactory | |
| pack-priv BiFunction | |
| pack-priv File |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv SshdSessionFactory | |
| pack-priv SshdSessionFactoryBuilder. |
| configFactory | back to summary |
|---|---|
| pack-priv SshdSessionFactoryBuilder. | |
| configFileFinder | back to summary |
|---|---|
| pack-priv Function<File, File> configFileFinder | |
| connectorFactory | back to summary |
|---|---|
| pack-priv ConnectorFactory connectorFactory | |
| connectorFactorySet | back to summary |
|---|---|
| pack-priv boolean connectorFactorySet | |
| defaultKeyFileFinder | back to summary |
|---|---|
| pack-priv Function<File, List<Path>> defaultKeyFileFinder | |
| defaultKeysProvider | back to summary |
|---|---|
| pack-priv Function<File, Iterable<KeyPair>> defaultKeysProvider | |
| homeDirectory | back to summary |
|---|---|
| pack-priv File homeDirectory | |
| knownHostsFileFinder | back to summary |
|---|---|
| pack-priv Function<File, List<Path>> knownHostsFileFinder | |
| passphraseProviderFactory | back to summary |
|---|---|
| pack-priv Function<CredentialsProvider, KeyPasswordProvider> passphraseProviderFactory | |
| preferredAuthentications | back to summary |
|---|---|
| pack-priv String preferredAuthentications | |
| proxyDataFactory | back to summary |
|---|---|
| pack-priv ProxyDataFactory proxyDataFactory | |
| serverKeyDatabaseCreator | back to summary |
|---|---|
| pack-priv BiFunction<File, File, ServerKeyDatabase> serverKeyDatabaseCreator | |
| sshDirectory | back to summary |
|---|---|
| pack-priv File sshDirectory | |
| State | back to summary |
|---|---|
| private State() | |
| build | back to summary |
|---|---|
| pack-priv SshdSessionFactory build(KeyCache cache) | |
| copy | back to summary |
|---|---|
| pack-priv SshdSessionFactoryBuilder. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected KeyPasswordProvider | createKeyPasswordProvider(CredentialsProvider
the provider)CredentialsProvider to delegate to for user
interactionsOverrides org. Creates a |
| protected ServerKeyDatabase | createServerKeyDatabase(File
home directory to use for ~ replacement homeDir, File representing ~/.ssh/ sshDir)Overrides org. Creates a |
| protected SshConfigStore | createSshConfigStore(File
may be used for ~-replacements by the returned config store homeDir, File to use, or configFile, String null if noneuser name of the current user on the local OS localUserName)Overrides org. Obtains a |
| protected ConnectorFactory | |
| protected List | getDefaultIdentities(File
the directory that represents ~/.ssh/ sshDir)Overrides org. Gets a list of default identities, i.e., private key files that shall always be tried for public key authentication. |
| protected Iterable | getDefaultKeys(File
to look in for keys sshDir)Overrides org. Determines the default keys. |
| protected List | getDefaultKnownHostsFiles(File
directory containing ssh configurations sshDir)Overrides org. Gets the list of default user known hosts files. |
| protected String | getDefaultPreferredAuthentications()
Overrides org. Gets the list of default preferred authentication mechanisms. |
| protected File | getSshConfig(File
representing ~/.ssh/ sshDir)Overrides org. Determines the ssh config file. |
| SessionFactory | back to summary |
|---|---|
| public SessionFactory(KeyCache cache, ProxyDataFactory proxyDataFactory) | |
| createKeyPasswordProvider | back to summary |
|---|---|
| protected KeyPasswordProvider createKeyPasswordProvider(CredentialsProvider provider) Overrides org. Doc from org. Creates a
| |
| createServerKeyDatabase | back to summary |
|---|---|
| protected ServerKeyDatabase createServerKeyDatabase(File homeDir, File sshDir) Overrides org. Doc from org. Creates a
| |
| createSshConfigStore | back to summary |
|---|---|
| protected SshConfigStore createSshConfigStore(File homeDir, File configFile, String localUserName) Overrides org. Doc from org. Obtains a
| |
| getConnectorFactory | back to summary |
|---|---|
| protected ConnectorFactory getConnectorFactory() Overrides org. Doc from org. Gets a
The default implementation uses
| |
| getDefaultIdentities | back to summary |
|---|---|
| protected List Overrides org. Doc from org. Gets a list of default identities, i.e., private key files that shall
always be tried for public key authentication. Typically those are
~/.ssh/id_dsa, ~/.ssh/id_rsa, and so on. The default implementation
returns the files defined in | |
| getDefaultKeys | back to summary |
|---|---|
| protected Iterable Overrides org. Doc from org. Determines the default keys. The default implementation will lazy load
the
Subclasses may override and return an
The default implementation uses exactly this mechanism; class
If the | |
| getDefaultKnownHostsFiles | back to summary |
|---|---|
| protected List Overrides org. Doc from org. Gets the list of default user known hosts files. The default returns
~/.ssh/known_hosts and ~/.ssh/known_hosts2. The ssh config
| |
| getDefaultPreferredAuthentications | back to summary |
|---|---|
| protected String getDefaultPreferredAuthentications() Overrides org. Doc from org. Gets the list of default preferred authentication mechanisms. If
| |
| getSshConfig | back to summary |
|---|---|
| protected File getSshConfig(File sshDir) Overrides org. Doc from org. Determines the ssh config file. The default implementation returns
~/.ssh/config. If the file does not exist and is created later it will be
picked up. To not use a config file at all, return | |