Package org.apache.sshd.cli.server
Class SshServerCliSupport
- java.lang.Object
-
- org.apache.sshd.cli.CliSupport
-
- org.apache.sshd.cli.server.SshServerCliSupport
-
- Direct Known Subclasses:
SshServerMain
public abstract class SshServerCliSupport extends CliSupport
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.sshd.server.shell.ShellFactoryDEFAULT_SHELL_FACTORYstatic java.lang.StringSHELL_FACTORY_OPTION-
Fields inherited from class org.apache.sshd.cli.CliSupport
DEFAULT_IO_SERVICE_FACTORY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSshServerCliSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.sshd.scp.server.ScpCommandFactorycreateScpCommandFactory(java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.server.shell.ShellFactory delegateShellFactory)static <F extends org.apache.sshd.server.subsystem.SubsystemFactory>
FregisterSubsystemFactoryListeners(org.apache.sshd.server.ServerFactoryManager server, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options, F factory)static org.apache.sshd.common.keyprovider.KeyPairProviderresolveServerKeys(java.io.PrintStream stderr, java.lang.String hostKeyType, int hostKeySize, java.util.Collection<java.lang.String> keyFiles)static java.util.List<org.apache.sshd.server.subsystem.SubsystemFactory>resolveServerSubsystems(org.apache.sshd.server.ServerFactoryManager server, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options)static org.apache.sshd.server.shell.ShellFactoryresolveShellFactory(java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options)Attempts to examine theSHELL_FACTORY_OPTIONconfiguration.static java.lang.ObjectsetupServerBanner(org.apache.sshd.server.ServerFactoryManager server, org.apache.sshd.common.PropertyResolver options)static org.apache.sshd.server.forward.ForwardingFiltersetupServerForwarding(org.apache.sshd.server.SshServer server, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options)-
Methods inherited from class org.apache.sshd.cli.CliSupport
createLoggingIoServiceEventListener, createLoggingSessionListener, printFieldsValues, resolveBuiltinIoServiceFactory, resolveIoServiceFactory, setupCiphers, setupCiphers, setupCompressions, setupCompressions, setupIoServiceFactory, setupMacs, setupMacs, setupUserAuthFactories, splitCommandLineArguments
-
-
-
-
Field Detail
-
SHELL_FACTORY_OPTION
public static final java.lang.String SHELL_FACTORY_OPTION
- See Also:
- Constant Field Values
-
DEFAULT_SHELL_FACTORY
public static final org.apache.sshd.server.shell.ShellFactory DEFAULT_SHELL_FACTORY
-
-
Method Detail
-
resolveServerKeys
public static org.apache.sshd.common.keyprovider.KeyPairProvider resolveServerKeys(java.io.PrintStream stderr, java.lang.String hostKeyType, int hostKeySize, java.util.Collection<java.lang.String> keyFiles) throws java.lang.Exception- Throws:
java.lang.Exception
-
setupServerForwarding
public static org.apache.sshd.server.forward.ForwardingFilter setupServerForwarding(org.apache.sshd.server.SshServer server, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options)
-
setupServerBanner
public static java.lang.Object setupServerBanner(org.apache.sshd.server.ServerFactoryManager server, org.apache.sshd.common.PropertyResolver options)
-
resolveServerSubsystems
public static java.util.List<org.apache.sshd.server.subsystem.SubsystemFactory> resolveServerSubsystems(org.apache.sshd.server.ServerFactoryManager server, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options) throws java.lang.Exception- Throws:
java.lang.Exception
-
registerSubsystemFactoryListeners
public static <F extends org.apache.sshd.server.subsystem.SubsystemFactory> F registerSubsystemFactoryListeners(org.apache.sshd.server.ServerFactoryManager server, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options, F factory) throws java.lang.Exception- Throws:
java.lang.Exception
-
resolveShellFactory
public static org.apache.sshd.server.shell.ShellFactory resolveShellFactory(java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.common.PropertyResolver options) throws java.lang.ExceptionAttempts to examine theSHELL_FACTORY_OPTIONconfiguration.- If missing/empty then returns the
DEFAULT_SHELL_FACTORY. - If
NONEthen returnsnull - If
SCPthen returns aScpCommandFactory - Otherwise, assumes this is a fully qualified class path of a
ShellFactoryimplementation and attempts to load and instantiate it using a public no-args constructor
- Parameters:
level- The verbosityLevelstdout- The STDOUT stream for loggingstderr- The STDERR stream for errorsoptions- The available options - assuming defaults ifnull- Returns:
- The resolved
ShellFactory - Throws:
java.lang.Exception- If failed to resolve
- If missing/empty then returns the
-
createScpCommandFactory
public static org.apache.sshd.scp.server.ScpCommandFactory createScpCommandFactory(java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, org.apache.sshd.server.shell.ShellFactory delegateShellFactory)
-
-