Interface ServerSession

All Superinterfaces:
org.apache.sshd.common.AttributeRepository, org.apache.sshd.common.AttributeStore, AutoCloseable, Channel, ChannelListenerManager, ChannelStreamWriterResolver, ChannelStreamWriterResolverManager, Closeable, org.apache.sshd.common.Closeable, org.apache.sshd.common.util.net.ConnectionEndpointsIndicator, FactoryManagerHolder, KexExtensionHandlerManager, KexFactoryManager, org.apache.sshd.common.keyprovider.KeyPairProviderHolder, org.apache.sshd.common.auth.MutableUserHolder, PortForwardingEventListenerManager, PortForwardingInformationProvider, org.apache.sshd.common.PropertyResolver, ReservedSessionMessagesManager, ServerAuthenticationManager, Session, org.apache.sshd.common.session.SessionContext, SessionDisconnectHandlerManager, org.apache.sshd.common.session.SessionHeartbeatController, SessionListenerManager, org.apache.sshd.common.signature.SignatureFactoriesHolder, org.apache.sshd.common.signature.SignatureFactoriesManager, UnknownChannelReferenceHandlerManager, org.apache.sshd.common.auth.UserAuthFactoriesManager<ServerSession, UserAuth, UserAuthFactory>, org.apache.sshd.common.auth.UsernameHolder
All Known Implementing Classes:
AbstractServerSession, ServerSessionImpl

public interface ServerSession extends Session, 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

      org.apache.sshd.common.io.IoWriteFuture signalAuthenticationSuccess(String username, String authService, org.apache.sshd.common.util.buffer.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