SshClient for JGit. It creates specialized
JGitClientSessions that know about the HostConfigEntry they
were created for, and it loads all KeyPair identities lazily.
| Modifier and Type | Class and Description |
|---|---|
| private static class | JGitSshClient.
A |
| private static class | JGitSshClient.
A |
| Modifier and Type | Field and Description |
|---|---|
| private CredentialsProvider | |
| public static final AttributeRepository. | HOME_DIRECTORY
An attribute key for the home directory. |
| pack-priv static final AttributeRepository. | HOST_CONFIG_ENTRY
We need access to this during the constructor of the ClientSession, before setConnectAddress() can have been called. |
| private KeyCache | |
| private Supplier | |
| public static final AttributeRepository. | LOCAL_FORWARD_ADDRESS
An attribute key for storing an alternate local address to connect to if a local forward from a ProxyJump ssh config is present. |
| pack-priv static final AttributeRepository. | |
| public static final AttributeRepository. | PREFERRED_AUTHENTICATIONS
An attribute key for the comma-separated list of default preferred authentication mechanisms. |
| private ProxyDataFactory |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private AttributeRepository | |
| private InetSocketAddress | |
| public ConnectFuture | connect(HostConfigEntry
The effective hostConfig, AttributeRepository HostConfigEntry to connect to - never nullAn optional "context" to be attached to the established session if successfully
connected context, SocketAddress The local address to use - if localAddress)null an automatic ephemeral port and bind address is
usedOverrides org. Implements org.
|
| private SshFutureListener | createConnectCompletionListener(ConnectFuture connectFuture, String username, InetSocketAddress address, HostConfigEntry hostConfig)
|
| private JGitClientSession | createSession(IoSession ioSession, String username, InetSocketAddress address, HostConfigEntry hostConfig)
|
| protected SessionFactory | |
| public CredentialsProvider | Returns: the provider, ornull if none is set.Retrieves the |
| public Supplier | Returns: a factory to createKeyPasswordProvidersRetrieves the |
| private int | |
| private ProxyData | |
| protected ProxyDataFactory | |
| private AttributeRepository | sessionAttributes(AttributeRepository parent, HostConfigEntry hostConfig, InetSocketAddress originalAddress)
|
| public void | setCredentialsProvider(CredentialsProvider
to set provider)Sets the |
| public void | |
| public void | setKeyPasswordProviderFactory(Supplier<KeyPasswordProvider>
to set factory)Sets a supplier for a |
| public void | setProxyDatabase(ProxyDataFactory
to use, or factory)null if proxying is not desired or
supportedSets a |
| credentialsProvider | back to summary |
|---|---|
| private CredentialsProvider credentialsProvider | |
| HOME_DIRECTORY | back to summary |
|---|---|
| public static final AttributeRepository. An attribute key for the home directory. | |
| HOST_CONFIG_ENTRY | back to summary |
|---|---|
| pack-priv static final AttributeRepository. We need access to this during the constructor of the ClientSession, before setConnectAddress() can have been called. So we have to remember it in an attribute on the SshClient, from where we can then retrieve it. | |
| keyCache | back to summary |
|---|---|
| private KeyCache keyCache | |
| keyPasswordProviderFactory | back to summary |
|---|---|
| private Supplier<KeyPasswordProvider> keyPasswordProviderFactory | |
| LOCAL_FORWARD_ADDRESS | back to summary |
|---|---|
| public static final AttributeRepository. An attribute key for storing an alternate local address to connect to if
a local forward from a ProxyJump ssh config is present. If set,
| |
| ORIGINAL_REMOTE_ADDRESS | back to summary |
|---|---|
| pack-priv static final AttributeRepository. | |
| PREFERRED_AUTHENTICATIONS | back to summary |
|---|---|
| public static final AttributeRepository. An attribute key for the comma-separated list of default preferred authentication mechanisms. | |
| proxyDatabase | back to summary |
|---|---|
| private ProxyDataFactory proxyDatabase | |
| JGitSshClient | back to summary |
|---|---|
| public JGitSshClient() | |
| chain | back to summary |
|---|---|
| private AttributeRepository chain(AttributeRepository self, AttributeRepository parent) | |
| configureProxy | back to summary |
|---|---|
| private InetSocketAddress configureProxy(ProxyData proxyData, InetSocketAddress remoteAddress) | |
| createConnectCompletionListener | back to summary |
|---|---|
| private SshFutureListener | |
| createSession | back to summary |
|---|---|
| private JGitClientSession createSession(IoSession ioSession, String username, InetSocketAddress address, HostConfigEntry hostConfig) | |
| createSessionFactory | back to summary |
|---|---|
| protected SessionFactory createSessionFactory() Overrides org.
| |
| getCredentialsProvider | back to summary |
|---|---|
| public CredentialsProvider getCredentialsProvider() Retrieves the
| |
| getKeyPasswordProviderFactory | back to summary |
|---|---|
| public Supplier Retrieves the
| |
| getNumberOfPasswordPrompts | back to summary |
|---|---|
| private int getNumberOfPasswordPrompts(HostConfigEntry hostConfig) | |
| getProxyData | back to summary |
|---|---|
| private ProxyData getProxyData(InetSocketAddress remoteAddress) | |
| getProxyDatabase | back to summary |
|---|---|
| protected ProxyDataFactory getProxyDatabase() Retrieves the
| |
| sessionAttributes | back to summary |
|---|---|
| private AttributeRepository sessionAttributes(AttributeRepository parent, HostConfigEntry hostConfig, InetSocketAddress originalAddress) | |
| setCredentialsProvider | back to summary |
|---|---|
| public void setCredentialsProvider(CredentialsProvider provider) Sets the
| |
| setKeyCache | back to summary |
|---|---|
| public void setKeyCache(KeyCache cache) Set a cache for loaded keys. Newly discovered keys will be added when IdentityFile host entries from the ssh config file are used during session authentication.
| |
| setKeyPasswordProviderFactory | back to summary |
|---|---|
| public void setKeyPasswordProviderFactory(Supplier<KeyPasswordProvider> factory) Sets a supplier for a
| |
| setProxyDatabase | back to summary |
|---|---|
| public void setProxyDatabase(ProxyDataFactory factory) Sets a
| |
| Modifier and Type | Field and Description |
|---|---|
| private final List |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Iterable | loadKeys(SessionContext
The context)SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool or session unknown).Implements org. Load available keys. |
| providers | back to summary |
|---|---|
| private final List<KeyIdentityProvider> providers | |
| CombinedKeyIdentityProvider | back to summary |
|---|---|
| public CombinedKeyIdentityProvider(KeyIdentityProvider... providers) | |
| CombinedKeyIdentityProvider | back to summary |
|---|---|
| public CombinedKeyIdentityProvider(List<KeyIdentityProvider> providers) | |
| loadKeys | back to summary |
|---|---|
| public Iterable Implements org. Doc from org. Load available keys.
| |
SessionFactory to create our own specialized
JGitClientSessions.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected ClientSessionImpl | doCreateSession(IoSession ioSession)
Overrides org.
|
| JGitSessionFactory | back to summary |
|---|---|
| public JGitSessionFactory(JGitSshClient client) | |
| doCreateSession | back to summary |
|---|---|
| protected ClientSessionImpl doCreateSession(IoSession ioSession) throws Exception Overrides org.
| |