Package com.sshtools.client
Class SshClientContext
java.lang.Object
com.sshtools.synergy.nio.ProtocolContext
com.sshtools.synergy.ssh.SshContext
com.sshtools.client.SshClientContext
- All Implemented Interfaces:
Context,ExecutorServiceProvider
Holds the configuration for an SSH connection.
-
Field Summary
FieldsFields inherited from class com.sshtools.synergy.ssh.SshContext
byteBufferPool, CIPHER_AES_GCM_128, CIPHER_AES_GCM_256, CIPHER_AES128_CBC, CIPHER_AES128_CTR, CIPHER_AES192_CBC, CIPHER_AES192_CTR, CIPHER_AES256_CBC, CIPHER_AES256_CTR, CIPHER_ARCFOUR, CIPHER_ARCFOUR_128, CIPHER_ARCFOUR_256, CIPHER_BLOWFISH_CBC, CIPHER_TRIPLEDES_CBC, CIPHER_TRIPLEDES_CTR, ciphersCS, ciphersSC, componentManager, COMPRESSION_NONE, COMPRESSION_ZLIB, compressionLevel, compressionsCS, compressionsSC, daemon, executor, extendedIdentificationSanitization, HMAC_MD5, HMAC_MD5_96, HMAC_MD5_ETM, HMAC_RIPEMD160, HMAC_RIPEMD160_ETM, HMAC_SHA1, HMAC_SHA1_96, HMAC_SHA1_ETM, HMAC_SHA256, HMAC_SHA256_96, HMAC_SHA256_ETM, HMAC_SHA512, HMAC_SHA512_96, HMAC_SHA512_ETM, idleAuthenticationTimeoutSeconds, idleConnectionTimeout, keepAliveDataMaxLength, keepAliveInterval, KEX_DIFFIE_HELLMAN_ECDH_NISTP_256, KEX_DIFFIE_HELLMAN_ECDH_NISTP_384, KEX_DIFFIE_HELLMAN_ECDH_NISTP_521, KEX_DIFFIE_HELLMAN_GROUP_EXCHANGE_SHA1, KEX_DIFFIE_HELLMAN_GROUP_EXCHANGE_SHA256, KEX_DIFFIE_HELLMAN_GROUP1_SHA1, KEX_DIFFIE_HELLMAN_GROUP14_SHA1, KEX_DIFFIE_HELLMAN_GROUP14_SHA256, KEX_DIFFIE_HELLMAN_GROUP15_SHA512, KEX_DIFFIE_HELLMAN_GROUP16_SHA512, KEX_DIFFIE_HELLMAN_GROUP17_SHA512, KEX_DIFFIE_HELLMAN_GROUP18_SHA512, KEYBOARD_INTERACTIVE_AUTHENTICATION, keyExchanges, killTunnelsOnRemoteForwardingCancel, locale, macCS, macSC, MAX_NUM_BYTES_BEFORE_REKEY, MAX_NUM_PACKETS_BEFORE_REKEY, maxChannels, maxDHGroupExchangeKeySize, maximumPacketLength, maximumSocketsBacklogPerRemotelyForwardedConnection, minDHGroupExchangeKeySize, PASSWORD_AUTHENTICATION, prefCipherCS, prefCipherSC, prefCompressionCS, prefCompressionSC, preferredDHGroupExchangeKeySize, prefKeyExchange, prefMacCS, prefMacSC, prefPublicKey, PUBLIC_KEY_ECDSA_SHA2_NISPTP_256, PUBLIC_KEY_ECDSA_SHA2_NISPTP_384, PUBLIC_KEY_ECDSA_SHA2_NISPTP_521, PUBLIC_KEY_ED25519, PUBLIC_KEY_ED448, PUBLIC_KEY_RSA_SHA256, PUBLIC_KEY_RSA_SHA512, PUBLIC_KEY_SSHDSS, PUBLIC_KEY_SSHRSA, PUBLICKEY_AUTHENTICATION, publicKeys, sendIgnorePacketOnIdle, signatures, softwareVersionCommentsFields inherited from class com.sshtools.synergy.nio.ProtocolContext
keepAlive, receiveBufferSize, reuseAddress, sendBufferSize, tcpNoDelay -
Constructor Summary
ConstructorsConstructorDescriptionSshClientContext(SecurityLevel securityLevel) SshClientContext(SshEngine daemon) SshClientContext(SshEngine daemon, ComponentManager componentManager, SecurityLevel securityLevel) SshClientContext(SshEngine daemon, SecurityLevel securityLevel) -
Method Summary
Modifier and TypeMethodDescriptionaddStateListener(ClientStateListener stateListener) protected voidcreateEngine(ConnectRequestFuture connectFuture) final SshEnginebooleanintGet the username of this connection.voidkeysExchanged(boolean first) setBannerDisplay(BannerDisplay bannerDisplay) voidsetChannelFactory(ChannelFactory<SshClientContext> channelFactory) setConnectionManager(ConnectionManager<SshClientContext> connectionManager) setForwardingManager(ForwardingManager<SshClientContext> forwardingManager) voidsetPreferKeyboardInteractiveOverPassword(boolean preferKeyboardInteractiveOverPassword) voidsetPreferredPublicKey(String prefPublicKey) setSubsystemCacheSize(int subsystemCacheSize) setUsername(String username) Set the username for this connection.booleanMethods inherited from class com.sshtools.synergy.ssh.SshContext
addOperationListener, enableFIPSMode, getByteBufferPool, getChannelLimit, getCiphersCS, getCiphersSC, getComponentManager, getCompressionLevel, getExecutorListeners, getExecutorService, getForwardingPolicy, getHttpRedirectUrl, getIdleAuthenticationTimeoutSeconds, getIdleConnectionTimeoutSeconds, getKeepAliveDataMaxLength, getKeepAliveInterval, getKeyExchangePacketLimit, getKeyExchanges, getKeyExchangeTransferLimit, getLocale, getMacsCS, getMacsSC, getMaxDHGroupExchangeKeySize, getMaximumPacketLength, getMaximumSocketsBacklogPerRemotelyForwardedConnection, getMinDHGroupExchangeKeySize, getPolicy, getPolicy, getPreferredCipherCS, getPreferredCipherSC, getPreferredCompressionCS, getPreferredCompressionSC, getPreferredDHGroupExchangeKeySize, getPreferredKeyExchange, getPreferredMacCS, getPreferredMacSC, getPublicKeys, getRemoteForwardingCancelKillsTunnels, getSoftwareVersionComments, getSupportedSignatures, hasPolicy, init, isExtendedIdentificationSanitization, isHttpRedirect, isSendIgnorePacketOnIdle, isSHA1SignaturesSupported, listPublicKeys, removeOperationListener, setChannelLimit, setCipherPreferredPositionCS, setCipherPreferredPositionSC, setCompressionLevel, setExtendedIdentificationSanitization, setHttpRedirect, setHttpRedirectUrl, setIdleAuthenticationTimeoutSeconds, setIdleConnectionTimeoutSeconds, setKeepAliveDataMaxLength, setKeepAliveInterval, setKeyExchangePacketLimit, setKeyExchangePreferredPosition, setKeyExchangeTransferLimit, setLocale, setMacPreferredPositionCS, setMacPreferredPositionSC, setMaxDHGroupExchangeKeySize, setMaximumPacketLength, setMaximumSocketsBacklogPerRemotelyForwardedConnection, setMinDHGroupExchangeKeySize, setPolicy, setPreferredCipherCS, setPreferredCipherCS, setPreferredCipherCS, setPreferredCipherSC, setPreferredCipherSC, setPreferredCipherSC, setPreferredCompressionCS, setPreferredCompressionSC, setPreferredDHGroupExchangeKeySize, setPreferredKeyExchange, setPreferredKeyExchange, setPreferredMacCS, setPreferredMacCS, setPreferredMacCS, setPreferredMacSC, setPreferredMacSC, setPreferredMacSC, setPublicKeyPreferredPosition, setRemoteForwardingCancelKillsTunnels, setSendIgnorePacketOnIdle, setSHA1SignaturesSupported, setSocketConnectionFactory, setSoftwareVersionComments, shutdown, supportedCiphersCS, supportedCiphersSC, supportedCompressionsCS, supportedCompressionsSC, supportedMacsCS, supportedMacsSC, supportedPublicKeysMethods inherited from class com.sshtools.synergy.nio.ProtocolContext
enableHTTPProxy, enableHTTPProxy, enableHTTPProxy, enableHTTPProxy, enableSocks4Proxy, enableSocks5Proxy, getOptionalHeaders, getProxyHostname, getProxyPassword, getProxyPort, getProxyType, getProxyUsername, getReceiveBufferSize, getSendBufferSize, getSocketOptionKeepAlive, getSocketOptionReuseAddress, getSocketOptionTcpNoDelay, getUserAgent, isProxyEnabled, isResolveLocally, setReceiveBufferSize, setSendBufferSize, setSocketOptionKeepAlive, setSocketOptionReuseAddress, setSocketOptionTcpNoDelay
-
Field Details
-
transport
-
-
Constructor Details
-
SshClientContext
- Throws:
IOExceptionSshException
-
SshClientContext
public SshClientContext(SshEngine daemon, ComponentManager componentManager, SecurityLevel securityLevel) throws IOException, SshException - Throws:
IOExceptionSshException
-
SshClientContext
- Throws:
IOExceptionSshException
-
SshClientContext
public SshClientContext(SshEngine daemon, SecurityLevel securityLevel) throws IOException, SshException - Throws:
IOExceptionSshException
-
SshClientContext
- Throws:
IOExceptionSshException
-
-
Method Details
-
createEngine
- Specified by:
createEnginein classSshContext- Throws:
IOException
-
getEngine
- Overrides:
getEnginein classSshContext
-
setUsername
Set the username for this connection.- Parameters:
username-
-
getUsername
Get the username of this connection.- Returns:
-
addStateListener
-
getStateListeners
-
getForwardingManager
- Specified by:
getForwardingManagerin classSshContext
-
setForwardingManager
-
keysExchanged
public void keysExchanged(boolean first) -
getAuthenticationClient
-
configureKeyExchanges
protected void configureKeyExchanges()- Specified by:
configureKeyExchangesin classSshContext
-
testClientKeyExchangeAlgorithm
public boolean testClientKeyExchangeAlgorithm(SshKeyExchangeClientFactory<? extends SshKeyExchangeClient> cls) -
getSupportedPublicKeys
- Specified by:
getSupportedPublicKeysin classSshContext
-
supportedKeyExchanges
- Overrides:
supportedKeyExchangesin classSshContext
-
getPreferredPublicKey
- Specified by:
getPreferredPublicKeyin classSshContext
-
setPreferredPublicKey
-
getConnectionManager
- Specified by:
getConnectionManagerin classSshContext
-
setConnectionManager
-
addAuthenticator
-
getAuthenticators
-
getBannerDisplay
-
setBannerDisplay
-
getSubsystemCacheSize
public int getSubsystemCacheSize() -
setSubsystemCacheSize
-
getChannelFactory
- Specified by:
getChannelFactoryin classSshContext
-
setChannelFactory
-
getDaemonContext
- Overrides:
getDaemonContextin classSshContext
-
addGlobalRequestHandler
-
getGlobalRequestHandler
- Specified by:
getGlobalRequestHandlerin classSshContext
-
getSocketConnectionFactory
- Overrides:
getSocketConnectionFactoryin classSshContext
-
getHostKeyVerification
-
setHostKeyVerification
-
getPreferKeyboardInteractiveOverPassword
public boolean getPreferKeyboardInteractiveOverPassword() -
setPreferKeyboardInteractiveOverPassword
public void setPreferKeyboardInteractiveOverPassword(boolean preferKeyboardInteractiveOverPassword)
-