public interface SshProvider
SshClient instances.| Modifier and Type | Method and Description |
|---|---|
SshAgent |
connectToLocalAgent(java.lang.String application)
Create a connection to the local agent using default or auto-detected
settings.
|
SshAgent |
connectToLocalAgent(java.lang.String application,
int protocol)
Create a connection to the local agent using default or auto-detected
settings.
|
SshAgent |
connectToLocalAgent(java.lang.String application,
java.lang.String location,
int socketType,
int protocol)
Create a connection to the local agent.
|
SshClient |
createClient(SshConfiguration configuration)
Create a new client instance with the specified configuration.
|
SshHostKeyManager |
createHostKeyManager(SshConfiguration configuration)
Create a
SshHostKeyManager that may be used to list, add and remove
valid host keys. |
SshIdentityManager |
createIdentityManager(SshConfiguration configuration)
Create an @
SshIdentityManager (if supported) |
java.util.List |
getCapabilities()
Get a list of the capabilities of this implementation (
Capability
objects) |
java.lang.String |
getName()
Get the name of the library that is used for this provider.
|
java.util.List |
getSupportedCiphers(int protocolVersion)
Get a list of supported ciphers.
|
java.util.List |
getSupportedCompression()
Get a list of supported compression types.
|
java.util.List |
getSupportedKeyExchange()
Get a list of supported key exchange algorithms.
|
java.util.List |
getSupportedMAC()
Get a list of supported MAC types.
|
java.util.List |
getSupportedPublicKey()
Get a list of supported public key algorithms.
|
void |
seed(long seed)
Seed the random number generator.
|
boolean |
supportsConfiguration(SshConfiguration configuration)
Examine the configuration to see if this provider supports it.
|
java.lang.String getName()
SshHostKeyManager createHostKeyManager(SshConfiguration configuration) throws SshException
SshHostKeyManager that may be used to list, add and remove
valid host keys. An implementation is not required to provide this
functionality, but vendors do, so this interface provides a common way to
access them.configuration - configurationSshExceptionjava.lang.UnsupportedOperationException - if not supportedSshIdentityManager createIdentityManager(SshConfiguration configuration)
SshIdentityManager (if supported)configuration - configurationjava.lang.UnsupportedOperationException - if not supportedjava.util.List getSupportedCiphers(int protocolVersion)
String of the
cipher name. If SshConfiguration.SSH1_OR_SSH2 is specified, the list
will contain cipher names for both version (in practice, SSH1 only supported
one cipher).
If the provider does not support SSH1, it should throw an
UnsupportedOperationException if SshConfiguration.SSH1_ONLY
is requested. The same applies for SSH2
protocolVersion - version of protocoljava.lang.UnsupportedOperationException - if protocol version not supportedjava.util.List getSupportedMAC()
String of
the MAC type name.
NOTE: Only applicable to SSH2
java.lang.UnsupportedOperationException - if SSH2 not supportedjava.util.List getSupportedCompression()
String of the compression type name.
NOTE: Only applicable to SSH2
java.lang.UnsupportedOperationException - if SSH2 not supportedjava.util.List getSupportedKeyExchange()
String of the key exchange name.
NOTE: Only applicable to SSH2
java.lang.UnsupportedOperationException - if SSH2 not supportedjava.util.List getSupportedPublicKey()
String of the public key name.
NOTE: Only applicable to SSH2
java.lang.UnsupportedOperationException - if SSH2 not supportedjava.util.List getCapabilities()
Capability
objects)Capabilityboolean supportsConfiguration(SshConfiguration configuration)
configuration - configurationSshClient createClient(SshConfiguration configuration)
IMPLEMENTATION NOTE: The provider implementation is expected to invoke
SshClient.init(SshProvider) after construction.
configuration - configurationjava.lang.UnsupportedOperationException - if the provider configuration is not validSshAgent connectToLocalAgent(java.lang.String application) throws SshException
application - the application connectingjava.lang.UnsupportedOperationException - if the provider configuration is not validSshExceptionSshAgent connectToLocalAgent(java.lang.String application, int protocol) throws SshException
application - the application connectingprotocol - protocol. One of SshAgent.AUTO_PROTOCOL,
SshAgent.OPENSSH_PROTOCOL or
SshAgent.RFC_PROTOCOL.java.lang.UnsupportedOperationException - if the provider configuration is not validSshExceptionSshAgent connectToLocalAgent(java.lang.String application, java.lang.String location, int socketType, int protocol) throws SshException
application - the application connectinglocation - the location of the agent, in the form "localhost:port"socketType - the type of socket. One of
SshAgent.TCPIP_AGENT_SOCKET_TYPE or
SshAgent.UNIX_DOMAIN_AGENT_SOCKET_TYPE.protocol - protocol. One of SshAgent.AUTO_PROTOCOL,
SshAgent.OPENSSH_PROTOCOL or
SshAgent.RFC_PROTOCOL.java.lang.UnsupportedOperationException - if the provider configuration is not validSshExceptionvoid seed(long seed)
seed - seedCopyright © 2018. All rights reserved.