public interface SessionContext extends ConnectionEndpointsIndicator, UsernameHolder, PropertyResolver, AttributeStore
AttributeRepository.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:
|
EMPTY
Modifier and Type | Method and Description |
---|---|
String |
getClientVersion()
Retrieve the client version for this session.
|
String |
getServerVersion()
Retrieve the server version for this session.
|
byte[] |
getSessionId() |
boolean |
isAuthenticated() |
static boolean |
isValidVersionPrefix(String version) |
getLocalAddress, getRemoteAddress
getUsername
getBoolean, getBooleanProperty, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
attributeKeys, getAttribute, getAttributesCount, ofAttributesMap, ofKeyValuePair, resolveAttribute
static 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 exchangedString getServerVersion()
null
/empty if versions not yet exchangedboolean 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 © 2008–2022 The Apache Software Foundation. All rights reserved.