Package org.apache.sshd.cli.client
Class SshClientCliSupport
java.lang.Object
org.apache.sshd.cli.CliSupport
org.apache.sshd.cli.client.SshClientCliSupport
- Direct Known Subclasses:
ScpCommandMain,SftpCommandMain,SshClientMain
TODO Add javadoc
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCommand line option used to indicate non-default target portFields inherited from class org.apache.sshd.cli.CliSupport
DEFAULT_IO_SERVICE_FACTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisArgumentedOption(String portOption, String argName) resolveClientEnvironment(Map<String, ?> options) resolveClientEnvironment(PropertyResolver resolver) resolveClientPtyModes(Map<String, ?> options) static PtyChannelConfigurationresolveClientPtyOptions(Map<String, ?> options) static PtyChannelConfigurationresolveClientPtyOptions(PropertyResolver resolver) static HostConfigEntryresolveHost(ClientFactoryManager client, String username, String host, int port, String proxyJump) static Pathstatic OutputStreamresolveLoggingTargetStream(PrintStream stdout, PrintStream stderr, String... args) static OutputStreamresolveLoggingTargetStream(PrintStream stdout, PrintStream stderr, String[] args, int maxIndex) static SshClientsetupClient(PropertyResolver resolver, List<NamedFactory<Cipher>> ciphers, List<NamedFactory<Mac>> macs, List<NamedFactory<Compression>> compressions, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr, Level level, String[] args) static ClientSessionsetupClientSession(String portOption, BufferedReader stdin, Level level, PrintStream stdout, PrintStream stderr, String... args) static SshClientsetupDefaultClient(PropertyResolver resolver, Level level, PrintStream stdout, PrintStream stderr, String... args) static HandlersetupLogging(Level level, PrintStream stdout, PrintStream stderr, OutputStream outputStream) static ServerKeyVerifiersetupServerKeyVerifier(ClientAuthenticationManager manager, PropertyResolver resolver, BufferedReader stdin, PrintStream stdout, PrintStream stderr) static voidsetupSessionExtensions(KexFactoryManager manager, PropertyResolver resolver, BufferedReader stdin, PrintStream stdout, PrintStream stderr) static FileKeyPairProvidersetupSessionIdentities(ClientFactoryManager client, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr) static UserInteractionsetupSessionUserInteraction(ClientAuthenticationManager client, BufferedReader stdin, PrintStream stdout, PrintStream stderr) 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
-
SSH_CLIENT_PORT_OPTION
Command line option used to indicate non-default target port- See Also:
-
-
Constructor Details
-
SshClientCliSupport
protected SshClientCliSupport()
-
-
Method Details
-
isArgumentedOption
-
setupClientSession
public static ClientSession setupClientSession(String portOption, BufferedReader stdin, Level level, PrintStream stdout, PrintStream stderr, String... args) throws Exception - Throws:
Exception
-
resolveHost
public static HostConfigEntry resolveHost(ClientFactoryManager client, String username, String host, int port, String proxyJump) throws IOException - Throws:
IOException
-
resolveIdentityFile
- Throws:
IOException
-
resolveClientEnvironment
-
resolveClientEnvironment
-
resolveClientPtyOptions
public static PtyChannelConfiguration resolveClientPtyOptions(PropertyResolver resolver) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
resolveClientPtyOptions
public static PtyChannelConfiguration resolveClientPtyOptions(Map<String, ?> options) throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
resolveClientPtyModes
public static Map<PtyMode,Integer> resolveClientPtyModes(Map<String, ?> options) throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-
setupDefaultClient
public static SshClient setupDefaultClient(PropertyResolver resolver, Level level, PrintStream stdout, PrintStream stderr, String... args) -
setupClient
public static SshClient setupClient(PropertyResolver resolver, List<NamedFactory<Cipher>> ciphers, List<NamedFactory<Mac>> macs, List<NamedFactory<Compression>> compressions, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr, Level level, String[] args) throws Exception - Throws:
Exception
-
setupSessionIdentities
public static FileKeyPairProvider setupSessionIdentities(ClientFactoryManager client, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr) throws Throwable - Throws:
Throwable
-
setupSessionUserInteraction
public static UserInteraction setupSessionUserInteraction(ClientAuthenticationManager client, BufferedReader stdin, PrintStream stdout, PrintStream stderr) -
setupSessionExtensions
public static void setupSessionExtensions(KexFactoryManager manager, PropertyResolver resolver, BufferedReader stdin, PrintStream stdout, PrintStream stderr) throws Exception - Throws:
Exception
-
setupServerKeyVerifier
public static ServerKeyVerifier setupServerKeyVerifier(ClientAuthenticationManager manager, PropertyResolver resolver, BufferedReader stdin, PrintStream stdout, PrintStream stderr) -
resolveLoggingTargetStream
public static OutputStream resolveLoggingTargetStream(PrintStream stdout, PrintStream stderr, String... args) -
resolveLoggingTargetStream
public static OutputStream resolveLoggingTargetStream(PrintStream stdout, PrintStream stderr, String[] args, int maxIndex) -
setupLogging
public static Handler setupLogging(Level level, PrintStream stdout, PrintStream stderr, OutputStream outputStream)
-