Interface ClientSession

All Superinterfaces:
AttributeRepository, AttributeStore, AutoCloseable, Channel, ChannelListenerManager, ChannelStreamWriterResolver, ChannelStreamWriterResolverManager, ClientAuthenticationManager, ClientProxyConnectorHolder, Closeable, Closeable, ConnectionEndpointsIndicator, FactoryManagerHolder, KexExtensionHandlerManager, KexFactoryManager, KeyIdentityProviderHolder, MutableUserHolder, PortForwardingEventListenerManager, PortForwardingInformationProvider, PortForwardingManager, PropertyResolver, ReservedSessionMessagesManager, Session, SessionContext, SessionDisconnectHandlerManager, SessionHeartbeatController, SessionListenerManager, SignatureFactoriesHolder, SignatureFactoriesManager, UnknownChannelReferenceHandlerManager, UserAuthFactoriesManager<ClientSession,UserAuth,UserAuthFactory>, UsernameHolder
All Known Implementing Classes:
AbstractClientSession, ClientSessionImpl

An authenticated session to a given SSH server.

A client session is established using the SshClient. Once the session has been created, the user has to authenticate using either ClientAuthenticationManager.addPasswordIdentity(String) or ClientAuthenticationManager.addPublicKeyIdentity(java.security.KeyPair) followed by a call to auth().

From this session, channels can be created using the createChannel(String) method. Multiple channels can be created on a given session concurrently.

When using the client in an interactive mode, the waitFor(Collection, long) method can be used to listen to specific events such as the session being established, authenticated or closed.

When a given session is no longer used, it must be closed using the Closeable.close(boolean) method.
Author:
Apache MINA SSHD Project