Class PropertyBasedSshSessionFactory
java.lang.Object
org.eclipse.jgit.transport.SshSessionFactory
org.eclipse.jgit.transport.sshd.SshdSessionFactory
org.springframework.cloud.config.server.ssh.PropertyBasedSshSessionFactory
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class PropertyBasedSshSessionFactory
extends org.eclipse.jgit.transport.sshd.SshdSessionFactory
In a cloud environment local SSH config files such as `.known_hosts` may not be
suitable for providing configuration settings due to ephemeral filesystems. This flag
enables SSH config to be provided as application properties
- Author:
- William Tran, Ollie Hughes
-
Constructor Summary
ConstructorDescriptionPropertyBasedSshSessionFactory
(Map<String, JGitEnvironmentProperties> sshKeysByHostname) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.jgit.transport.SshConfigStore
createSshConfigStore
(File homeDir, File configFile, String localUserName) getDefaultKeys
(File dir) protected org.eclipse.jgit.transport.sshd.ServerKeyDatabase
getServerKeyDatabase
(File homeDir, File dir) protected File
getSshConfig
(File dir) Methods inherited from class org.eclipse.jgit.transport.sshd.SshdSessionFactory
close, createKeyPasswordProvider, createServerKeyDatabase, getDefaultIdentities, getDefaultKnownHostsFiles, getDefaultPreferredAuthentications, getHomeDirectory, getKeyCache, getSession, getSshDirectory, getType, setHomeDirectory, setSshDirectory
Methods inherited from class org.eclipse.jgit.transport.SshSessionFactory
getInstance, getLocalUserName, releaseSession, setInstance
-
Constructor Details
-
PropertyBasedSshSessionFactory
-
-
Method Details
-
createSshConfigStore
protected org.eclipse.jgit.transport.SshConfigStore createSshConfigStore(File homeDir, File configFile, String localUserName) - Overrides:
createSshConfigStore
in classorg.eclipse.jgit.transport.sshd.SshdSessionFactory
-
getSshConfig
- Overrides:
getSshConfig
in classorg.eclipse.jgit.transport.sshd.SshdSessionFactory
-
getServerKeyDatabase
protected org.eclipse.jgit.transport.sshd.ServerKeyDatabase getServerKeyDatabase(File homeDir, File dir) - Overrides:
getServerKeyDatabase
in classorg.eclipse.jgit.transport.sshd.SshdSessionFactory
-
getDefaultKeys
- Overrides:
getDefaultKeys
in classorg.eclipse.jgit.transport.sshd.SshdSessionFactory
-