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.SshdSessionFactoryIn 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
Constructors Constructor Description PropertyBasedSshSessionFactory(Map<String,JGitEnvironmentProperties> sshKeysByHostname)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.jgit.transport.SshConfigStorecreateSshConfigStore(File homeDir, File configFile, String localUserName)protected Iterable<KeyPair>getDefaultKeys(File dir)protected org.eclipse.jgit.transport.sshd.ServerKeyDatabasegetServerKeyDatabase(File homeDir, File dir)protected FilegetSshConfig(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
-
-
-
-
Constructor Detail
-
PropertyBasedSshSessionFactory
public PropertyBasedSshSessionFactory(Map<String,JGitEnvironmentProperties> sshKeysByHostname)
-
-
Method Detail
-
createSshConfigStore
protected org.eclipse.jgit.transport.SshConfigStore createSshConfigStore(File homeDir, File configFile, String localUserName)
- Overrides:
createSshConfigStorein classorg.eclipse.jgit.transport.sshd.SshdSessionFactory
-
getSshConfig
protected File getSshConfig(File dir)
- Overrides:
getSshConfigin classorg.eclipse.jgit.transport.sshd.SshdSessionFactory
-
getServerKeyDatabase
protected org.eclipse.jgit.transport.sshd.ServerKeyDatabase getServerKeyDatabase(File homeDir, File dir)
- Overrides:
getServerKeyDatabasein classorg.eclipse.jgit.transport.sshd.SshdSessionFactory
-
-