public interface SessionContext extends ConnectionEndpointsIndicator, UsernameHolder, SessionHeartbeatController, AttributeStore
SessionHeartbeatController.HeartbeatTypeAttributeRepository.AttributeKey<T>| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SSH_VERSION_PREFIX
Default prefix expected for the client / server identification string
|
static String |
FALLBACK_SSH_VERSION_PREFIX
Backward compatible special prefix
|
static int |
MAX_VERSION_LINE_LENGTH
Maximum number of characters for any single line sent as part
of the initial handshake - according to
RFC 4253 - section 4.2:
The maximum length of the string is 255 characters,
including the Carriage Return and Line Feed. |
DEFAULT_CONNECTION_HEARTBEAT_INTERVAL, SESSION_HEARTBEAT_INTERVAL, SESSION_HEARTBEAT_TYPEEMPTY| Modifier and Type | Method and Description |
|---|---|
Map<KexProposalOption,String> |
getClientKexProposals() |
String |
getClientVersion()
Retrieve the client version for this session.
|
Map<KexProposalOption,String> |
getKexNegotiationResult() |
KexState |
getKexState() |
String |
getNegotiatedKexParameter(KexProposalOption paramType)
Retrieve one of the negotiated values during the KEX stage
|
Map<KexProposalOption,String> |
getServerKexProposals() |
String |
getServerVersion()
Retrieve the server version for this session.
|
byte[] |
getSessionId() |
boolean |
isAuthenticated() |
static boolean |
isValidVersionPrefix(String version) |
getLocalAddress, getRemoteAddressgetUsernamedisableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeatgetBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringPropertyclearAttributes, computeAttributeIfAbsent, removeAttribute, setAttributeattributeKeys, getAttribute, getAttributesCount, ofAttributesMap, ofKeyValuePair, resolveAttributestatic final String DEFAULT_SSH_VERSION_PREFIX
static final String FALLBACK_SSH_VERSION_PREFIX
static final int MAX_VERSION_LINE_LENGTH
The maximum length of the string is 255 characters,
including the Carriage Return and Line Feed.
byte[] getSessionId()
null if
not yet establishedString getClientVersion()
null/empty if versions not yet exchangedMap<KexProposalOption,String> getClientKexProposals()
getKexState()String getServerVersion()
null/empty if versions not yet exchangedMap<KexProposalOption,String> getServerKexProposals()
getKexState()KexState getKexState()
Map<KexProposalOption,String> getKexNegotiationResult()
String getNegotiatedKexParameter(KexProposalOption paramType)
paramType - The request KexProposalOption value
- ignored if nullnull if invalid
parameter or no negotiated value.getKexState()boolean isAuthenticated()
true if session has successfully completed the authentication phasestatic boolean isValidVersionPrefix(String version)
version - The reported client/server versiontrue if version not empty and starts with either
"SSH-2.0-" or "SSH-1.99-"Copyright © 2018–2019 The Apache Software Foundation. All rights reserved.