Class JGitClientSession
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.util.closeable.IoBaseCloseable
-
- org.apache.sshd.common.util.closeable.AbstractCloseable
-
- org.apache.sshd.common.util.closeable.AbstractInnerCloseable
-
- org.apache.sshd.common.kex.AbstractKexFactoryManager
-
- org.apache.sshd.common.session.helpers.SessionHelper
-
- org.apache.sshd.common.session.helpers.AbstractSession
-
- org.apache.sshd.client.session.AbstractClientSession
-
- org.apache.sshd.client.session.ClientSessionImpl
-
- org.eclipse.jgit.internal.transport.sshd.JGitClientSession
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,org.apache.sshd.client.ClientAuthenticationManager,org.apache.sshd.client.session.ClientProxyConnectorHolder,org.apache.sshd.client.session.ClientSession,org.apache.sshd.common.AttributeRepository,org.apache.sshd.common.AttributeStore,org.apache.sshd.common.auth.MutableUserHolder,org.apache.sshd.common.auth.UserAuthFactoriesManager<org.apache.sshd.client.session.ClientSession,org.apache.sshd.client.auth.UserAuth,org.apache.sshd.client.auth.UserAuthFactory>,org.apache.sshd.common.auth.UsernameHolder,org.apache.sshd.common.channel.ChannelListenerManager,org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolver,org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolverManager,org.apache.sshd.common.Closeable,org.apache.sshd.common.FactoryManagerHolder,org.apache.sshd.common.forward.PortForwardingEventListenerManager,org.apache.sshd.common.forward.PortForwardingInformationProvider,org.apache.sshd.common.forward.PortForwardingManager,org.apache.sshd.common.io.PacketWriter,org.apache.sshd.common.kex.extension.KexExtensionHandlerManager,org.apache.sshd.common.kex.KexFactoryManager,org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder,org.apache.sshd.common.PropertyResolver,org.apache.sshd.common.session.ReservedSessionMessagesManager,org.apache.sshd.common.session.Session,org.apache.sshd.common.session.SessionContext,org.apache.sshd.common.session.SessionDisconnectHandlerManager,org.apache.sshd.common.session.SessionHeartbeatController,org.apache.sshd.common.session.SessionListenerManager,org.apache.sshd.common.session.UnknownChannelReferenceHandlerManager,org.apache.sshd.common.signature.SignatureFactoriesManager,org.apache.sshd.common.util.net.ConnectionEndpointsIndicator
public class JGitClientSession extends org.apache.sshd.client.session.ClientSessionImplAClientSessionthat can be associated with theHostConfigEntrythe session was created for. TheJGitSshClientcreates such sessions and sets this association.Also provides for associating a JGit
CredentialsProviderwith a session.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJGitClientSession.ChainingAttributesAnAttributeRepositorythat chains together two other attribute sources in a hierarchy.static classJGitClientSession.SessionAttributesAJGitClientSession.ChainingAttributesrepository that doubles as aPropertyResolver.-
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable.State
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.AttributeRepository
org.apache.sshd.common.AttributeRepository.AttributeKey<T extends java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.sshd.client.future.AuthFutureauthFutureWork-around for bug 565394 / SSHD-1050; remove when using sshd 2.6.0.private CredentialsProvidercredentialsProviderprivate static intDEFAULT_MAX_IDENTIFICATION_SIZEDefault setting for the maximum number of bytes to read in the initial protocol version exchange.private java.util.List<java.lang.Throwable>earlyErrorsRecords exceptions before there is an authFuture.private java.lang.ObjecterrorLockGuards setting an earlyError and the authFuture together.private org.apache.sshd.client.config.hosts.HostConfigEntryhostConfigprivate StatefulProxyConnectorproxyHandler-
Fields inherited from class org.apache.sshd.client.session.AbstractClientSession
sendImmediateClientIdentification, sendImmediateKexInit
-
Fields inherited from class org.apache.sshd.common.session.helpers.AbstractSession
channelListenerProxy, channelListeners, clientProposal, clientVersion, currentService, decodeLock, decoderBuffer, decoderLength, decoderState, encodeLock, firstKexPacketFollows, ignorePacketDataLength, ignorePacketsCount, ignorePacketsFrequency, ignorePacketsVariance, inBlocksCount, inBytesCount, inCipher, inCipherSize, inCompression, inMac, inMacResult, inMacSize, inPacketsCount, kex, kexFutureHolder, kexState, lastKeyTimeValue, maxRekeyBlocks, maxRekeyBytes, maxRekeyInterval, maxRekyPackets, negotiationResult, outBlocksCount, outBytesCount, outCipher, outCipherSize, outCompression, outMac, outMacSize, outPacketsCount, pendingPackets, random, requestLock, seqi, seqo, serverProposal, serverVersion, SESSION, sessionId, sessionListenerProxy, sessionListeners, tunnelListenerProxy, tunnelListeners, uncompressBuffer, unmodClientProposal, unmodNegotiationResult, unmodServerProposal
-
Fields inherited from class org.apache.sshd.common.session.helpers.SessionHelper
authNanoStart, idleNanoStart, sessionLock
-
Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, state
-
Fields inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolver
NONE
-
Fields inherited from interface org.apache.sshd.client.ClientAuthenticationManager
DEFAULT_PASSWORD_PROMPTS, PASSWORD_PROMPTS, PREFERRED_AUTHS
-
Fields inherited from interface org.apache.sshd.client.session.ClientSession
REMOTE_COMMAND_WAIT_EVENTS
-
Fields inherited from interface org.apache.sshd.common.Closeable
CLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description JGitClientSession(org.apache.sshd.client.ClientFactoryManager manager, org.apache.sshd.common.io.IoSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.sshd.client.future.AuthFutureauth()protected voidcheckKeys()protected java.util.List<java.lang.String>doReadIdentification(org.apache.sshd.common.util.buffer.Buffer buffer, boolean server)Reads the RFC 4253, section 4.2 protocol version identification.private static java.lang.StringescapeControls(java.lang.String s)voidexceptionCaught(java.lang.Throwable t)private java.util.List<java.lang.String>filteredList(java.util.Set<java.lang.String> known, java.lang.String values)<T> TgetAttribute(org.apache.sshd.common.AttributeRepository.AttributeKey<T> key)CredentialsProvidergetCredentialsProvider()Retrieves theCredentialsProviderset for this session.org.apache.sshd.client.config.hosts.HostConfigEntrygetHostConfigEntry()Retrieves theHostConfigEntrythis session was created for.org.apache.sshd.common.PropertyResolvergetParentPropertyResolver()protected voidhandleDisconnect(int code, java.lang.String msg, java.lang.String lang, org.apache.sshd.common.util.buffer.Buffer buffer)voidmessageReceived(org.apache.sshd.common.util.Readable buffer)As long as we're still setting up the proxy connection, diverts messages to theStatefulProxyConnector.protected voidpreClose()private voidremoveFromList(java.util.Set<java.lang.String> current, java.lang.String key, java.lang.String patterns)protected java.lang.StringresolveAvailableSignaturesProposal(org.apache.sshd.common.FactoryManager manager)protected org.apache.sshd.common.io.IoWriteFuturesendIdentification(java.lang.String ident)protected byte[]sendKexInit()voidsetCredentialsProvider(CredentialsProvider provider)Sets theCredentialsProviderfor this session.voidsetHostConfigEntry(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig)Sets theHostConfigEntrythis session was created for.voidsetProxyHandler(StatefulProxyConnector handler)Sets aStatefulProxyConnectorto handle proxy connection protocols.private voidsignalAuthFailure(java.lang.Throwable t)protected voidsignalAuthFailure(org.apache.sshd.client.future.AuthFuture future, java.lang.Throwable t)protected <C extends java.util.Collection<org.apache.sshd.client.session.ClientSession.ClientSessionEvent>>
CupdateCurrentSessionState(C newState)-
Methods inherited from class org.apache.sshd.client.session.ClientSessionImpl
getMetadataMap, getServices, getSessionState, nextServiceName, sendInitialServiceRequest, signalSessionEvent, switchToNextService, waitFor
-
Methods inherited from class org.apache.sshd.client.session.AbstractClientSession
addPasswordIdentity, addPublicKeyIdentity, createChannel, createChannel, createDirectTcpipChannel, createExecChannel, createShellChannel, createSubsystemChannel, getClientProxyConnector, getConnectAddress, getConnectionContext, getConnectionService, getFactoryManager, getForwardingFilter, getKeyIdentityProvider, getPasswordIdentityProvider, getRegisteredIdentities, getServerKeyVerifier, getUserAuthFactories, getUserAuthService, getUserInteraction, initializeKeyExchangePhase, initializeProxyConnector, readIdentification, receiveKexInit, receiveKexInit, removePasswordIdentity, removePublicKeyIdentity, sendClientIdentification, sendKexInit, setClientProxyConnector, setConnectAddress, setKexSeed, setKeyIdentityProvider, setPasswordIdentityProvider, setServerKeyVerifier, setUserAuthFactories, setUserInteraction, signalExtraServerVersionInfo, startDynamicPortForwarding, startLocalPortForwarding, startRemotePortForwarding, startService, stopDynamicPortForwarding, stopLocalPortForwarding, stopRemotePortForwarding, switchToNoneCipher
-
Methods inherited from class org.apache.sshd.common.session.helpers.AbstractSession
addChannelListener, addPortForwardingEventListener, addSessionListener, appendOutgoingMac, attachSession, checkRekey, comparePreferredKexProposalOption, createBuffer, decode, doHandleMessage, doKexNegotiation, doWritePacket, encode, encryptOutgoingBuffer, getChannelListenerProxy, getCipherInformation, getClientKexData, getClientKexProposals, getClientVersion, getCompressionInformation, getInnerCloseable, getKex, getKexNegotiationResult, getKexState, getMacInformation, getNegotiatedKexParameter, getPortForwardingEventListenerProxy, getServerKexData, getServerKexProposals, getServerVersion, getService, getSession, getSession, getSessionId, getSessionListenerProxy, handleFirstKexPacketFollows, handleKexExtension, handleKexInit, handleKexMessage, handleMessage, handleNewCompression, handleNewKeys, handleServiceAccept, handleServiceAccept, handleServiceRequest, handleServiceRequest, isRekeyBlocksCountExceeded, isRekeyDataSizeExceeded, isRekeyPacketCountsExceeded, isRekeyRequired, isRekeyTimeIntervalExceeded, negotiate, notImplemented, prepareBuffer, receiveKexInit, receiveNewKeys, reExchangeKeys, refreshConfiguration, removeChannelListener, removePortForwardingEventListener, removeSessionListener, request, requestFailure, requestNewKeysExchange, requestSuccess, resolveAvailableSignaturesProposal, resolveIgnoreBufferDataLength, resolveOutputPacket, resolveSessionKexProposal, sendNewKeys, sendPendingPackets, setClientKexData, setNegotiationResult, setServerKexData, validateIncomingMac, validateKexState, validateTargetBuffer, writePacket
-
Methods inherited from class org.apache.sshd.common.session.helpers.SessionHelper
attributeKeys, calculateNextIgnorePacketCount, checkAuthenticationTimeout, checkForTimeouts, checkIdleTimeout, clearAttributes, computeAttributeIfAbsent, createProposal, disconnect, getAttributesCount, getAuthTimeout, getAuthTimeoutStart, getBoundLocalPortForward, getBoundRemotePortForward, getChannelStreamPacketWriterResolver, getIdleTimeout, getIdleTimeoutStart, getIoSession, getLocalForwardsBindings, getProperties, getRemoteForwardsBindings, getReservedSessionMessagesHandler, getSessionDisconnectHandler, getStartedLocalPortForwards, getStartedRemotePortForwards, getTimeoutStatus, getUnknownChannelReferenceHandler, getUsername, handleDebug, handleDisconnect, handleIgnore, handleUnimplemented, invokeSessionSignaller, isAuthenticated, isLocalPortForwardingStartedForPort, isRemotePortForwardingStartedForPort, isServerSession, mergeProposals, removeAttribute, resetAuthTimeout, resetIdleTimeout, resizeKey, resolveChannelStreamPacketWriterResolver, resolveIdentificationString, resolvePeerAddress, resolveReservedSessionMessagesHandler, resolveUnknownChannelReferenceHandler, sendDebugMessage, sendIgnoreMessage, sendNotImplemented, setAttribute, setAuthenticated, setChannelStreamPacketWriterResolver, setReservedSessionMessagesHandler, setSessionDisconnectHandler, setUnknownChannelReferenceHandler, setUsername, signalDisconnect, signalDisconnect, signalExceptionCaught, signalExceptionCaught, signalNegotiationEnd, signalNegotiationEnd, signalNegotiationStart, signalNegotiationStart, signalPeerIdentificationReceived, signalPeerIdentificationReceived, signalSessionClosed, signalSessionClosed, signalSessionCreated, signalSessionCreated, signalSessionEstablished, signalSessionEstablished, signalSessionEvent, toString, writePacket
-
Methods inherited from class org.apache.sshd.common.kex.AbstractKexFactoryManager
getCipherFactories, getCompressionFactories, getDelegate, getKexExtensionHandler, getKeyExchangeFactories, getMacFactories, getSignatureFactories, resolveEffectiveFactories, resolveEffectiveProvider, setCipherFactories, setCompressionFactories, setKexExtensionHandler, setKeyExchangeFactories, setMacFactories, setSignatureFactories
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractInnerCloseable
doCloseGracefully, doCloseImmediately
-
Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListener
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.AttributeRepository
attributeKeys, getAttributesCount
-
Methods inherited from interface org.apache.sshd.common.AttributeStore
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
-
Methods inherited from interface org.apache.sshd.common.channel.ChannelListenerManager
addChannelListener, getChannelListenerProxy, removeChannelListener
-
Methods inherited from interface org.apache.sshd.common.channel.throttle.ChannelStreamPacketWriterResolverManager
getChannelStreamPacketWriterResolver, resolveChannelStreamPacketWriter, resolveChannelStreamPacketWriterResolver, setChannelStreamPacketWriterResolver
-
Methods inherited from interface org.apache.sshd.client.ClientAuthenticationManager
setUserAuthFactoriesNames
-
Methods inherited from interface org.apache.sshd.client.session.ClientSession
createDynamicPortForwardingTracker, createExecChannel, createLocalPortForwardingTracker, createRemotePortForwardingTracker, createShellChannel, executeRemoteCommand, executeRemoteCommand, executeRemoteCommand
-
Methods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Methods inherited from interface org.apache.sshd.common.kex.extension.KexExtensionHandlerManager
getKexExtensionHandler, setKexExtensionHandler
-
Methods inherited from interface org.apache.sshd.common.kex.KexFactoryManager
getCipherFactories, getCipherFactoriesNameList, getCipherFactoriesNames, getCompressionFactories, getCompressionFactoriesNameList, getCompressionFactoriesNames, getKeyExchangeFactories, getMacFactories, getMacFactoriesNameList, getMacFactoriesNames, setCipherFactories, setCipherFactoriesNameList, setCipherFactoriesNames, setCipherFactoriesNames, setCompressionFactories, setCompressionFactoriesNameList, setCompressionFactoriesNames, setCompressionFactoriesNames, setKeyExchangeFactories, setMacFactories, setMacFactoriesNameList, setMacFactoriesNames, setMacFactoriesNames
-
Methods inherited from interface org.apache.sshd.common.forward.PortForwardingEventListenerManager
addPortForwardingEventListener, getPortForwardingEventListenerProxy, removePortForwardingEventListener
-
Methods inherited from interface org.apache.sshd.common.forward.PortForwardingInformationProvider
getBoundLocalPortForward, getBoundRemotePortForward, getLocalForwardsBindings, getRemoteForwardsBindings, getStartedLocalPortForwards, getStartedRemotePortForwards, isLocalPortForwardingStartedForPort, isRemotePortForwardingStartedForPort
-
Methods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getProperties, getString, getStringProperty
-
Methods inherited from interface org.apache.sshd.common.session.ReservedSessionMessagesManager
getReservedSessionMessagesHandler, setReservedSessionMessagesHandler
-
Methods inherited from interface org.apache.sshd.common.session.Session
createBuffer, createBuffer, disconnect, getAuthTimeout, getAuthTimeoutStart, getIdleTimeout, getIdleTimeoutStart, getIoSession, getKex, getLocalAddress, getRemoteAddress, getService, getTimeoutStatus, prepareBuffer, reExchangeKeys, request, resetAuthTimeout, resetIdleTimeout, resolveAttribute, sendDebugMessage, sendIgnoreMessage, setAuthenticated, writePacket
-
Methods inherited from interface org.apache.sshd.common.session.SessionContext
getCipherInformation, getClientKexProposals, getClientVersion, getCompressionInformation, getKexNegotiationResult, getKexState, getMacInformation, getNegotiatedKexParameter, getServerKexProposals, getServerVersion, getSessionId, isAuthenticated, isServerSession
-
Methods inherited from interface org.apache.sshd.common.session.SessionDisconnectHandlerManager
getSessionDisconnectHandler, setSessionDisconnectHandler
-
Methods inherited from interface org.apache.sshd.common.session.SessionHeartbeatController
disableSessionHeartbeat, getSessionHeartbeatInterval, getSessionHeartbeatType, setSessionHeartbeat
-
Methods inherited from interface org.apache.sshd.common.session.SessionListenerManager
addSessionListener, getSessionListenerProxy, removeSessionListener
-
Methods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesManager
getSignatureFactories, getSignatureFactoriesNameList, getSignatureFactoriesNames, setSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNames
-
Methods inherited from interface org.apache.sshd.common.session.UnknownChannelReferenceHandlerManager
getUnknownChannelReferenceHandler, resolveUnknownChannelReferenceHandler, setUnknownChannelReferenceHandler
-
-
-
-
Field Detail
-
DEFAULT_MAX_IDENTIFICATION_SIZE
private static final int DEFAULT_MAX_IDENTIFICATION_SIZE
Default setting for the maximum number of bytes to read in the initial protocol version exchange. 64kb is what OpenSSH < 8.0 read; OpenSSH 8.0 changed it to 8Mb, but that seems excessive for the purpose stated in RFC 4253. The Apache MINA sshd default inFactoryManager.DEFAULT_MAX_IDENTIFICATION_SIZEis 16kb.- See Also:
- Constant Field Values
-
hostConfig
private org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig
-
credentialsProvider
private CredentialsProvider credentialsProvider
-
proxyHandler
private volatile StatefulProxyConnector proxyHandler
-
authFuture
private volatile org.apache.sshd.client.future.AuthFuture authFuture
Work-around for bug 565394 / SSHD-1050; remove when using sshd 2.6.0.
-
earlyErrors
private java.util.List<java.lang.Throwable> earlyErrors
Records exceptions before there is an authFuture.
-
errorLock
private final java.lang.Object errorLock
Guards setting an earlyError and the authFuture together.
-
-
Method Detail
-
auth
public org.apache.sshd.client.future.AuthFuture auth() throws java.io.IOException- Specified by:
authin interfaceorg.apache.sshd.client.session.ClientSession- Overrides:
authin classorg.apache.sshd.client.session.ClientSessionImpl- Throws:
java.io.IOException
-
signalAuthFailure
protected void signalAuthFailure(org.apache.sshd.client.future.AuthFuture future, java.lang.Throwable t)- Overrides:
signalAuthFailurein classorg.apache.sshd.client.session.ClientSessionImpl
-
signalAuthFailure
private void signalAuthFailure(java.lang.Throwable t)
-
exceptionCaught
public void exceptionCaught(java.lang.Throwable t)
- Specified by:
exceptionCaughtin interfaceorg.apache.sshd.common.session.Session- Overrides:
exceptionCaughtin classorg.apache.sshd.client.session.ClientSessionImpl
-
preClose
protected void preClose()
- Overrides:
preClosein classorg.apache.sshd.client.session.ClientSessionImpl
-
handleDisconnect
protected void handleDisconnect(int code, java.lang.String msg, java.lang.String lang, org.apache.sshd.common.util.buffer.Buffer buffer) throws java.lang.Exception- Overrides:
handleDisconnectin classorg.apache.sshd.client.session.ClientSessionImpl- Throws:
java.lang.Exception
-
updateCurrentSessionState
protected <C extends java.util.Collection<org.apache.sshd.client.session.ClientSession.ClientSessionEvent>> C updateCurrentSessionState(C newState)
- Overrides:
updateCurrentSessionStatein classorg.apache.sshd.client.session.ClientSessionImpl
-
getHostConfigEntry
public org.apache.sshd.client.config.hosts.HostConfigEntry getHostConfigEntry()
Retrieves theHostConfigEntrythis session was created for.- Returns:
- the
HostConfigEntry, ornullif none set
-
setHostConfigEntry
public void setHostConfigEntry(org.apache.sshd.client.config.hosts.HostConfigEntry hostConfig)
Sets theHostConfigEntrythis session was created for.- Parameters:
hostConfig- theHostConfigEntry
-
setCredentialsProvider
public void setCredentialsProvider(CredentialsProvider provider)
Sets theCredentialsProviderfor this session.- Parameters:
provider- to set
-
getCredentialsProvider
public CredentialsProvider getCredentialsProvider()
Retrieves theCredentialsProviderset for this session.- Returns:
- the provider, or
nullif none is set.
-
setProxyHandler
public void setProxyHandler(StatefulProxyConnector handler)
Sets aStatefulProxyConnectorto handle proxy connection protocols.- Parameters:
handler- to set
-
sendIdentification
protected org.apache.sshd.common.io.IoWriteFuture sendIdentification(java.lang.String ident) throws java.io.IOException- Overrides:
sendIdentificationin classorg.apache.sshd.common.session.helpers.SessionHelper- Throws:
java.io.IOException
-
sendKexInit
protected byte[] sendKexInit() throws java.io.IOException, java.security.GeneralSecurityException- Overrides:
sendKexInitin classorg.apache.sshd.common.session.helpers.AbstractSession- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
messageReceived
public void messageReceived(org.apache.sshd.common.util.Readable buffer) throws java.lang.ExceptionAs long as we're still setting up the proxy connection, diverts messages to theStatefulProxyConnector.- Overrides:
messageReceivedin classorg.apache.sshd.common.session.helpers.AbstractSession- Throws:
java.lang.Exception
-
checkKeys
protected void checkKeys() throws org.apache.sshd.common.SshException- Overrides:
checkKeysin classorg.apache.sshd.client.session.AbstractClientSession- Throws:
org.apache.sshd.common.SshException
-
resolveAvailableSignaturesProposal
protected java.lang.String resolveAvailableSignaturesProposal(org.apache.sshd.common.FactoryManager manager)
- Overrides:
resolveAvailableSignaturesProposalin classorg.apache.sshd.client.session.AbstractClientSession
-
removeFromList
private void removeFromList(java.util.Set<java.lang.String> current, java.lang.String key, java.lang.String patterns)
-
filteredList
private java.util.List<java.lang.String> filteredList(java.util.Set<java.lang.String> known, java.lang.String values)
-
doReadIdentification
protected java.util.List<java.lang.String> doReadIdentification(org.apache.sshd.common.util.buffer.Buffer buffer, boolean server) throws java.io.StreamCorruptedExceptionReads the RFC 4253, section 4.2 protocol version identification. The Apache MINA sshd default implementation checks for NUL bytes also in any preceding lines, whereas RFC 4253 requires such a check only for the actual identification string starting with "SSH-". Likewise, the 255 character limit exists only for the identification string, not for the preceding lines. CR-LF handling is also relaxed.- Overrides:
doReadIdentificationin classorg.apache.sshd.common.session.helpers.SessionHelper- Parameters:
buffer- to read fromserver- whether we're an SSH server (should always befalse)- Returns:
- the lines read, with the server identification line last, or
nullif no identification line was found and more bytes are needed - Throws:
java.io.StreamCorruptedException- if the identification is malformed- See Also:
- RFC 4253, section 4.2
-
escapeControls
private static java.lang.String escapeControls(java.lang.String s)
-
getAttribute
public <T> T getAttribute(org.apache.sshd.common.AttributeRepository.AttributeKey<T> key)
- Specified by:
getAttributein interfaceorg.apache.sshd.common.AttributeRepository- Overrides:
getAttributein classorg.apache.sshd.common.session.helpers.SessionHelper
-
getParentPropertyResolver
public org.apache.sshd.common.PropertyResolver getParentPropertyResolver()
- Specified by:
getParentPropertyResolverin interfaceorg.apache.sshd.common.PropertyResolver- Overrides:
getParentPropertyResolverin classorg.apache.sshd.common.session.helpers.SessionHelper
-
-