The SshServer class is the main entry point for the server side of the SSH protocol.
The SshServer has to be configured before being started. Such configuration can be done either using a dependency
injection mechanism (such as the Spring framework) or programmatically. Basic setup is usually done using the
setUpDefaultServer() method, which will known ciphers, macs, channels, etc... Besides this basic setup, a
few things have to be manually configured such as the port number, Factory, the
org. and the PasswordAuthenticator.
Some properties can also be configured using the PropertyResolverUtils updateProperty methods.
start() method and stopped
using the stop() method.
ServerFactoryManager, org.apache.sshd.common.FactoryManager
| Modifier and Type | Field and Description |
|---|---|
| protected IoAcceptor | |
| private CommandFactory | |
| public static final List | |
| public static final Factory | |
| private GSSAuthenticator | |
| protected String | |
| private HostBasedAuthenticator | |
| private HostKeyCertificateProvider | |
| private KeyboardInteractiveAuthenticator | |
| private KeyPairProvider | |
| private PasswordAuthenticator | |
| protected int | |
| private ServerProxyAcceptor | |
| private PublickeyAuthenticator | |
| private SessionFactory | |
| private ShellFactory | |
| private final AtomicBoolean | |
| private List | |
| private List |
| Access | Constructor and Description |
|---|---|
| public |
| acceptor | back to summary |
|---|---|
| protected IoAcceptor acceptor | |
| commandFactory | back to summary |
|---|---|
| private CommandFactory commandFactory | |
| DEFAULT_SERVICE_FACTORIES | back to summary |
|---|---|
| public static final List<ServiceFactory> DEFAULT_SERVICE_FACTORIES | |
| DEFAULT_SSH_SERVER_FACTORY | back to summary |
|---|---|
| public static final Factory<SshServer> DEFAULT_SSH_SERVER_FACTORY | |
| gssAuthenticator | back to summary |
|---|---|
| private GSSAuthenticator gssAuthenticator | |
| host | back to summary |
|---|---|
| protected String host | |
| hostBasedAuthenticator | back to summary |
|---|---|
| private HostBasedAuthenticator hostBasedAuthenticator | |
| hostKeyCertificateProvider | back to summary |
|---|---|
| private HostKeyCertificateProvider hostKeyCertificateProvider | |
| interactiveAuthenticator | back to summary |
|---|---|
| private KeyboardInteractiveAuthenticator interactiveAuthenticator | |
| keyPairProvider | back to summary |
|---|---|
| private KeyPairProvider keyPairProvider | |
| passwordAuthenticator | back to summary |
|---|---|
| private PasswordAuthenticator passwordAuthenticator | |
| port | back to summary |
|---|---|
| protected int port | |
| proxyAcceptor | back to summary |
|---|---|
| private ServerProxyAcceptor proxyAcceptor | |
| publickeyAuthenticator | back to summary |
|---|---|
| private PublickeyAuthenticator publickeyAuthenticator | |
| sessionFactory | back to summary |
|---|---|
| private SessionFactory sessionFactory | |
| shellFactory | back to summary |
|---|---|
| private ShellFactory shellFactory | |
| started | back to summary |
|---|---|
| private final AtomicBoolean started | |
| subsystemFactories | back to summary |
|---|---|
| private List<? extends SubsystemFactory> subsystemFactories | |
| userAuthFactories | back to summary |
|---|---|
| private List<UserAuthFactory> userAuthFactories | |
| SshServer | back to summary |
|---|---|
| public SshServer() | |
| checkConfig | back to summary |
|---|---|
| protected void checkConfig() Overrides org.
| |
| createAcceptor | back to summary |
|---|---|
| protected IoAcceptor createAcceptor() | |
| createSessionFactory | back to summary |
|---|---|
| protected SessionFactory createSessionFactory() | |
| getActiveSessions | back to summary |
|---|---|
| public List Obtain the list of active sessions.
| |
| getBoundAddresses | back to summary |
|---|---|
public Set
| |
| getCommandFactory | back to summary |
|---|---|
| public CommandFactory getCommandFactory() Implements org. Doc from org. Retrieve the
| |
| getGSSAuthenticator | back to summary |
|---|---|
| public GSSAuthenticator getGSSAuthenticator() Implements org. Doc from org. Retrieve the
| |
| getHost | back to summary |
|---|---|
| public String getHost() | |
| getHostBasedAuthenticator | back to summary |
|---|---|
| public HostBasedAuthenticator getHostBasedAuthenticator() Implements org. Doc from org. Retrieve the
| |
| getHostKeyCertificateProvider | back to summary |
|---|---|
| public HostKeyCertificateProvider getHostKeyCertificateProvider() Implements org.
| |
| getInnerCloseable | back to summary |
|---|---|
| protected Closeable getInnerCloseable() Implements abstract org.
| |
| getKeyboardInteractiveAuthenticator | back to summary |
|---|---|
| public KeyboardInteractiveAuthenticator getKeyboardInteractiveAuthenticator() Implements org. Doc from org. Retrieve the
| |
| getKeyPairProvider | back to summary |
|---|---|
| public KeyPairProvider getKeyPairProvider() Implements org. Doc from org. Retrieve the
| |
| getPasswordAuthenticator | back to summary |
|---|---|
| public PasswordAuthenticator getPasswordAuthenticator() Implements org. Doc from org. Retrieve the
| |
| getPort | back to summary |
|---|---|
| public int getPort() | |
| getPublickeyAuthenticator | back to summary |
|---|---|
| public PublickeyAuthenticator getPublickeyAuthenticator() Implements org. Doc from org. Retrieve the
| |
| getServerProxyAcceptor | back to summary |
|---|---|
| public ServerProxyAcceptor getServerProxyAcceptor() Implements org.
| |
| getSessionFactory | back to summary |
|---|---|
| public SessionFactory getSessionFactory() | |
| getShellFactory | back to summary |
|---|---|
| public ShellFactory getShellFactory() Implements org. Doc from org. Retrieve the
| |
| getSubsystemFactories | back to summary |
|---|---|
| public List Implements org. Doc from org. Retrieve the list of named factories for
| |
| getUserAuthFactories | back to summary |
|---|---|
| public List Implements org. Doc from org. Retrieve the list of named factories for
| |
| isStarted | back to summary |
|---|---|
| public boolean isStarted() | |
| open | back to summary |
|---|---|
| public void open() throws IOException | |
| setCommandFactory | back to summary |
|---|---|
| public void setCommandFactory(CommandFactory commandFactory) | |
| setGSSAuthenticator | back to summary |
|---|---|
| public void setGSSAuthenticator(GSSAuthenticator gssAuthenticator) Implements org.
| |
| setHost | back to summary |
|---|---|
| public void setHost(String host) | |
| setHostBasedAuthenticator | back to summary |
|---|---|
| public void setHostBasedAuthenticator(HostBasedAuthenticator hostBasedAuthenticator) Implements org.
| |
| setHostKeyCertificateProvider | back to summary |
|---|---|
| public void setHostKeyCertificateProvider(HostKeyCertificateProvider hostKeyCertificateProvider) Implements org.
| |
| setKeyboardInteractiveAuthenticator | back to summary |
|---|---|
| public void setKeyboardInteractiveAuthenticator(KeyboardInteractiveAuthenticator interactiveAuthenticator) Implements org.
| |
| setKeyPairProvider | back to summary |
|---|---|
| public void setKeyPairProvider(KeyPairProvider keyPairProvider) Implements org.
| |
| setPasswordAuthenticator | back to summary |
|---|---|
| public void setPasswordAuthenticator(PasswordAuthenticator passwordAuthenticator) Implements org.
| |
| setPort | back to summary |
|---|---|
| public void setPort(int port) Configure the port number to use for this SSH server.
| |
| setPublickeyAuthenticator | back to summary |
|---|---|
| public void setPublickeyAuthenticator(PublickeyAuthenticator publickeyAuthenticator) Implements org.
| |
| setServerProxyAcceptor | back to summary |
|---|---|
| public void setServerProxyAcceptor(ServerProxyAcceptor proxyAcceptor) Implements org.
| |
| setSessionFactory | back to summary |
|---|---|
| public void setSessionFactory(SessionFactory sessionFactory) | |
| setShellFactory | back to summary |
|---|---|
| public void setShellFactory(ShellFactory shellFactory) | |
| setSubsystemFactories | back to summary |
|---|---|
| public void setSubsystemFactories(List<? extends SubsystemFactory> subsystemFactories) | |
| setUpDefaultServer | back to summary |
|---|---|
| public static SshServer setUpDefaultServer() Setup a default server | |
| setUserAuthFactories | back to summary |
|---|---|
| public void setUserAuthFactories(List<UserAuthFactory> userAuthFactories) Implements org.
| |
| start | back to summary |
|---|---|
| public void start() throws IOException Start the SSH server and accept incoming exceptions on the configured port. Ignored if already
| |
| stop | back to summary |
|---|---|
| public void stop() throws IOException Stop the SSH server. This method will block until all resources are actually disposed.
| |
| stop | back to summary |
|---|---|
| public void stop(boolean immediately) throws IOException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |