Interface ServerSession

All Superinterfaces:
AttributeRepository, AttributeStore, AutoCloseable, Channel, ChannelListenerManager, ChannelStreamWriterResolver, ChannelStreamWriterResolverManager, Closeable, Closeable, ConnectionEndpointsIndicator, FactoryManagerHolder, KexExtensionHandlerManager, KexFactoryManager, KeyPairProviderHolder, MutableUserHolder, PortForwardingEventListenerManager, PortForwardingInformationProvider, PropertyResolver, ReservedSessionMessagesManager, ServerAuthenticationManager, ServerProxyAcceptorHolder, Session, SessionContext, SessionDisconnectHandlerManager, SessionHeartbeatController, SessionListenerManager, SignatureFactoriesHolder, SignatureFactoriesManager, UnknownChannelReferenceHandlerManager, UserAuthFactoriesManager<ServerSession,UserAuth,UserAuthFactory>, UsernameHolder
All Known Implementing Classes:
AbstractServerSession, ServerSessionImpl

public interface ServerSession extends Session, ServerProxyAcceptorHolder, ServerAuthenticationManager
Author:
Apache MINA SSHD Project
  • Method Details

    • getFactoryManager

      ServerFactoryManager getFactoryManager()
      Specified by:
      getFactoryManager in interface FactoryManagerHolder
      Returns:
      The ServerFactoryManager for this session
    • getClientAddress

      SocketAddress getClientAddress()
      Returns:
      The SocketAddress of the remote client. If no proxy wrapping was used then this is the same as the IoSession#getRemoteAddress(). Otherwise, it indicates the real client's address that was somehow transmitted via the proxy meta-data
    • getHostKey

      KeyPair getHostKey()
      Returns:
      The KeyPair representing the current session's used keys on KEX - null if not negotiated yet
    • getActiveSessionCountForUser

      int getActiveSessionCountForUser(String userName)
      Retrieve the current number of sessions active for a given username.
      Parameters:
      userName - The name of the user - ignored if null/empty
      Returns:
      The current number of live SshSession objects associated with the user
    • signalAuthenticationSuccess

      IoWriteFuture signalAuthenticationSuccess(String username, String authService, Buffer buffer) throws Exception

      • Marks the session as authenticated.
      • Starts the specified service.
      • Sends the SSH_MSG_USERAUTH_SUCCESS message.
      Parameters:
      username - The authenticated username
      authService - The service to start
      buffer - Any extra data received to use to start the service
      Returns:
      An IoWriteFuture that can be used to wait for the SSH_MSG_USERAUTH_SUCCESS message send result
      Throws:
      Exception - if cannot handle the request