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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.sshd.server.shell.ShellFactory
static final String
Fields inherited from class org.apache.sshd.cli.CliSupport
DEFAULT_IO_SERVICE_FACTORY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.sshd.scp.server.ScpCommandFactory
createScpCommandFactory
(Level level, PrintStream stdout, 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, Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.common.PropertyResolver options, F factory) static org.apache.sshd.common.keyprovider.KeyPairProvider
resolveServerKeys
(PrintStream stderr, String hostKeyType, int hostKeySize, Collection<String> keyFiles) static List
<org.apache.sshd.server.subsystem.SubsystemFactory> resolveServerSubsystems
(org.apache.sshd.server.ServerFactoryManager server, Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.common.PropertyResolver options) static org.apache.sshd.server.shell.ShellFactory
resolveShellFactory
(Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.common.PropertyResolver options) Attempts to examine theSHELL_FACTORY_OPTION
configuration.static Object
setupServerBanner
(org.apache.sshd.server.ServerFactoryManager server, org.apache.sshd.common.PropertyResolver options) static org.apache.sshd.server.forward.ForwardingFilter
setupServerForwarding
(org.apache.sshd.server.SshServer server, Level level, PrintStream stdout, 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 Details
-
SHELL_FACTORY_OPTION
- See Also:
-
DEFAULT_SHELL_FACTORY
public static final org.apache.sshd.server.shell.ShellFactory DEFAULT_SHELL_FACTORY
-
-
Constructor Details
-
SshServerCliSupport
protected SshServerCliSupport()
-
-
Method Details
-
resolveServerKeys
public static org.apache.sshd.common.keyprovider.KeyPairProvider resolveServerKeys(PrintStream stderr, String hostKeyType, int hostKeySize, Collection<String> keyFiles) throws Exception - Throws:
Exception
-
setupServerForwarding
public static org.apache.sshd.server.forward.ForwardingFilter setupServerForwarding(org.apache.sshd.server.SshServer server, Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.common.PropertyResolver options) -
setupServerBanner
public static Object setupServerBanner(org.apache.sshd.server.ServerFactoryManager server, org.apache.sshd.common.PropertyResolver options) -
resolveServerSubsystems
public static List<org.apache.sshd.server.subsystem.SubsystemFactory> resolveServerSubsystems(org.apache.sshd.server.ServerFactoryManager server, Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.common.PropertyResolver options) throws Exception - Throws:
Exception
-
registerSubsystemFactoryListeners
public static <F extends org.apache.sshd.server.subsystem.SubsystemFactory> F registerSubsystemFactoryListeners(org.apache.sshd.server.ServerFactoryManager server, Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.common.PropertyResolver options, F factory) throws Exception - Throws:
Exception
-
resolveShellFactory
public static org.apache.sshd.server.shell.ShellFactory resolveShellFactory(Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.common.PropertyResolver options) throws Exception Attempts to examine theSHELL_FACTORY_OPTION
configuration.- If missing/empty then returns the
DEFAULT_SHELL_FACTORY
. - If
NONE
then returnsnull
- If
SCP
then returns aScpCommandFactory
- Otherwise, assumes this is a fully qualified class path of a
ShellFactory
implementation and attempts to load and instantiate it using a public no-args constructor
- If missing/empty then returns the
-
createScpCommandFactory
public static org.apache.sshd.scp.server.ScpCommandFactory createScpCommandFactory(Level level, PrintStream stdout, PrintStream stderr, org.apache.sshd.server.shell.ShellFactory delegateShellFactory)
-