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
FieldsFields inherited from class org.apache.sshd.cli.CliSupport
DEFAULT_IO_SERVICE_FACTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ScpCommandFactorycreateScpCommandFactory(Level level, PrintStream stdout, PrintStream stderr, ShellFactory delegateShellFactory) static <F extends SubsystemFactory>
FregisterSubsystemFactoryListeners(ServerFactoryManager server, Level level, PrintStream stdout, PrintStream stderr, PropertyResolver options, F factory) static KeyPairProviderresolveServerKeys(PrintStream stderr, String hostKeyType, int hostKeySize, Collection<String> keyFiles) static List<SubsystemFactory>resolveServerSubsystems(ServerFactoryManager server, Level level, PrintStream stdout, PrintStream stderr, PropertyResolver options) static ShellFactoryresolveShellFactory(Level level, PrintStream stdout, PrintStream stderr, PropertyResolver options) Attempts to examine theSHELL_FACTORY_OPTIONconfiguration.static ObjectsetupServerBanner(ServerFactoryManager server, PropertyResolver options) static ForwardingFiltersetupServerForwarding(SshServer server, Level level, PrintStream stdout, PrintStream stderr, 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
-
-
Constructor Details
-
SshServerCliSupport
protected SshServerCliSupport()
-
-
Method Details
-
resolveServerKeys
public static KeyPairProvider resolveServerKeys(PrintStream stderr, String hostKeyType, int hostKeySize, Collection<String> keyFiles) throws Exception - Throws:
Exception
-
setupServerForwarding
public static ForwardingFilter setupServerForwarding(SshServer server, Level level, PrintStream stdout, PrintStream stderr, PropertyResolver options) -
setupServerBanner
-
resolveServerSubsystems
public static List<SubsystemFactory> resolveServerSubsystems(ServerFactoryManager server, Level level, PrintStream stdout, PrintStream stderr, PropertyResolver options) throws Exception - Throws:
Exception
-
registerSubsystemFactoryListeners
public static <F extends SubsystemFactory> F registerSubsystemFactoryListeners(ServerFactoryManager server, Level level, PrintStream stdout, PrintStream stderr, PropertyResolver options, F factory) throws Exception - Throws:
Exception
-
resolveShellFactory
public static ShellFactory resolveShellFactory(Level level, PrintStream stdout, PrintStream stderr, PropertyResolver options) throws Exception Attempts 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:
Exception- If failed to resolve
- If missing/empty then returns the
-
createScpCommandFactory
public static ScpCommandFactory createScpCommandFactory(Level level, PrintStream stdout, PrintStream stderr, ShellFactory delegateShellFactory)
-