Package org.apache.sshd.cli
Class CliSupport
java.lang.Object
org.apache.sshd.cli.CliSupport
- Direct Known Subclasses:
SshClientCliSupport,SshServerCliSupport
Provides common utilities for SSH client/server execution from the CLI
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IoServiceEventListenercreateLoggingIoServiceEventListener(org.slf4j.Logger logger) static SessionListenercreateLoggingSessionListener(org.slf4j.Logger logger) static voidprintFieldsValues(Object info, PrintStream stdout) resolveBuiltinIoServiceFactory(PrintStream stderr, String argName, String provider) resolveIoServiceFactory(PrintStream stderr, String... args) Scans the arguments for the "-io" command line option and sets the I/O service accordingly.static List<NamedFactory<Cipher>>setupCiphers(String argName, String argVal, List<NamedFactory<Cipher>> current, PrintStream stderr) static List<NamedFactory<Cipher>>setupCiphers(PropertyResolver options, PrintStream stderr) static List<NamedFactory<Compression>>setupCompressions(String argName, String argVal, List<NamedFactory<Compression>> current, PrintStream stderr) static List<NamedFactory<Compression>>setupCompressions(PropertyResolver options, PrintStream stderr) static <M extends AbstractFactoryManager>
MsetupIoServiceFactory(M manager, PropertyResolver resolver, Level level, PrintStream stdout, PrintStream stderr, String... args) static List<NamedFactory<Mac>>setupMacs(String argName, String argVal, List<NamedFactory<Mac>> current, PrintStream stderr) static List<NamedFactory<Mac>>setupMacs(PropertyResolver options, PrintStream stderr) static <S extends SessionContext,M extends UserAuthInstance<S>, F extends UserAuthMethodFactory<S, M>, I extends UserAuthFactoriesManager<S, M, F>>
voidsetupUserAuthFactories(I manager, PropertyResolver options) static String[]
-
Field Details
-
DEFAULT_IO_SERVICE_FACTORY
-
-
Constructor Details
-
CliSupport
protected CliSupport()
-
-
Method Details
-
setupUserAuthFactories
public static <S extends SessionContext,M extends UserAuthInstance<S>, void setupUserAuthFactoriesF extends UserAuthMethodFactory<S, M>, I extends UserAuthFactoriesManager<S, M, F>> (I manager, PropertyResolver options) -
resolveIoServiceFactory
public static BuiltinIoServiceFactoryFactories resolveIoServiceFactory(PrintStream stderr, String... args) Scans the arguments for the "-io" command line option and sets the I/O service accordingly. If no specific option specified thenDEFAULT_IO_SERVICE_FACTORYis used.- Parameters:
stderr- Error stream for output of error messagesargs- The arguments to scan- Returns:
- The resolved I/O service factory -
nullif errors encountered
-
resolveBuiltinIoServiceFactory
public static BuiltinIoServiceFactoryFactories resolveBuiltinIoServiceFactory(PrintStream stderr, String argName, String provider) -
setupIoServiceFactory
public static <M extends AbstractFactoryManager> M setupIoServiceFactory(M manager, PropertyResolver resolver, Level level, PrintStream stdout, PrintStream stderr, String... args) -
createLoggingIoServiceEventListener
-
createLoggingSessionListener
-
setupCompressions
public static List<NamedFactory<Compression>> setupCompressions(PropertyResolver options, PrintStream stderr) -
setupCompressions
public static List<NamedFactory<Compression>> setupCompressions(String argName, String argVal, List<NamedFactory<Compression>> current, PrintStream stderr) -
setupMacs
-
setupMacs
public static List<NamedFactory<Mac>> setupMacs(String argName, String argVal, List<NamedFactory<Mac>> current, PrintStream stderr) -
setupCiphers
-
setupCiphers
public static List<NamedFactory<Cipher>> setupCiphers(String argName, String argVal, List<NamedFactory<Cipher>> current, PrintStream stderr) -
splitCommandLineArguments
-
printFieldsValues
- Throws:
Exception
-