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
public abstract class SshClientCliSupport extends CliSupport
TODO Add javadoc
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SSH_CLIENT_PORT_OPTION
Command line option used to indicate non-default target port-
Fields inherited from class org.apache.sshd.cli.CliSupport
DEFAULT_IO_SERVICE_FACTORY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SshClientCliSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isArgumentedOption(java.lang.String portOption, java.lang.String argName)
static java.util.Map<java.lang.String,?>
resolveClientEnvironment(java.util.Map<java.lang.String,?> options)
static java.util.Map<java.lang.String,?>
resolveClientEnvironment(org.apache.sshd.common.PropertyResolver resolver)
static java.util.Map<org.apache.sshd.common.channel.PtyMode,java.lang.Integer>
resolveClientPtyModes(java.util.Map<java.lang.String,?> options)
static org.apache.sshd.common.channel.PtyChannelConfiguration
resolveClientPtyOptions(java.util.Map<java.lang.String,?> options)
static org.apache.sshd.common.channel.PtyChannelConfiguration
resolveClientPtyOptions(org.apache.sshd.common.PropertyResolver resolver)
static org.apache.sshd.client.config.hosts.HostConfigEntry
resolveHost(org.apache.sshd.client.ClientFactoryManager client, java.lang.String username, java.lang.String host, int port, java.lang.String proxyJump)
static java.nio.file.Path
resolveIdentityFile(java.lang.String id)
static java.io.OutputStream
resolveLoggingTargetStream(java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args)
static java.io.OutputStream
resolveLoggingTargetStream(java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String[] args, int maxIndex)
static org.apache.sshd.client.SshClient
setupClient(org.apache.sshd.common.PropertyResolver resolver, java.util.List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.cipher.Cipher>> ciphers, java.util.List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.mac.Mac>> macs, java.util.List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.compression.Compression>> compressions, java.util.Collection<? extends java.nio.file.Path> identities, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr, java.util.logging.Level level, java.lang.String[] args)
static org.apache.sshd.client.session.ClientSession
setupClientSession(java.lang.String portOption, java.io.BufferedReader stdin, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args)
static org.apache.sshd.client.SshClient
setupDefaultClient(org.apache.sshd.common.PropertyResolver resolver, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args)
static java.util.logging.Handler
setupLogging(java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, java.io.OutputStream outputStream)
static org.apache.sshd.client.keyverifier.ServerKeyVerifier
setupServerKeyVerifier(org.apache.sshd.client.ClientAuthenticationManager manager, org.apache.sshd.common.PropertyResolver resolver, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr)
static void
setupSessionExtensions(org.apache.sshd.common.kex.KexFactoryManager manager, org.apache.sshd.common.PropertyResolver resolver, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr)
static org.apache.sshd.common.keyprovider.FileKeyPairProvider
setupSessionIdentities(org.apache.sshd.client.ClientFactoryManager client, java.util.Collection<? extends java.nio.file.Path> identities, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr)
static org.apache.sshd.client.auth.keyboard.UserInteraction
setupSessionUserInteraction(org.apache.sshd.client.ClientAuthenticationManager client, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.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 Detail
-
SSH_CLIENT_PORT_OPTION
public static final java.lang.String SSH_CLIENT_PORT_OPTION
Command line option used to indicate non-default target port- See Also:
- Constant Field Values
-
-
Method Detail
-
isArgumentedOption
public static boolean isArgumentedOption(java.lang.String portOption, java.lang.String argName)
-
setupClientSession
public static org.apache.sshd.client.session.ClientSession setupClientSession(java.lang.String portOption, java.io.BufferedReader stdin, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
resolveHost
public static org.apache.sshd.client.config.hosts.HostConfigEntry resolveHost(org.apache.sshd.client.ClientFactoryManager client, java.lang.String username, java.lang.String host, int port, java.lang.String proxyJump) throws java.io.IOException
- Throws:
java.io.IOException
-
resolveIdentityFile
public static java.nio.file.Path resolveIdentityFile(java.lang.String id) throws java.io.IOException
- Throws:
java.io.IOException
-
resolveClientEnvironment
public static java.util.Map<java.lang.String,?> resolveClientEnvironment(org.apache.sshd.common.PropertyResolver resolver)
-
resolveClientEnvironment
public static java.util.Map<java.lang.String,?> resolveClientEnvironment(java.util.Map<java.lang.String,?> options)
-
resolveClientPtyOptions
public static org.apache.sshd.common.channel.PtyChannelConfiguration resolveClientPtyOptions(org.apache.sshd.common.PropertyResolver resolver) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
resolveClientPtyOptions
public static org.apache.sshd.common.channel.PtyChannelConfiguration resolveClientPtyOptions(java.util.Map<java.lang.String,?> options) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
resolveClientPtyModes
public static java.util.Map<org.apache.sshd.common.channel.PtyMode,java.lang.Integer> resolveClientPtyModes(java.util.Map<java.lang.String,?> options) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
setupDefaultClient
public static org.apache.sshd.client.SshClient setupDefaultClient(org.apache.sshd.common.PropertyResolver resolver, java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args)
-
setupClient
public static org.apache.sshd.client.SshClient setupClient(org.apache.sshd.common.PropertyResolver resolver, java.util.List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.cipher.Cipher>> ciphers, java.util.List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.mac.Mac>> macs, java.util.List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.compression.Compression>> compressions, java.util.Collection<? extends java.nio.file.Path> identities, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr, java.util.logging.Level level, java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setupSessionIdentities
public static org.apache.sshd.common.keyprovider.FileKeyPairProvider setupSessionIdentities(org.apache.sshd.client.ClientFactoryManager client, java.util.Collection<? extends java.nio.file.Path> identities, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setupSessionUserInteraction
public static org.apache.sshd.client.auth.keyboard.UserInteraction setupSessionUserInteraction(org.apache.sshd.client.ClientAuthenticationManager client, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr)
-
setupSessionExtensions
public static void setupSessionExtensions(org.apache.sshd.common.kex.KexFactoryManager manager, org.apache.sshd.common.PropertyResolver resolver, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setupServerKeyVerifier
public static org.apache.sshd.client.keyverifier.ServerKeyVerifier setupServerKeyVerifier(org.apache.sshd.client.ClientAuthenticationManager manager, org.apache.sshd.common.PropertyResolver resolver, java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr)
-
resolveLoggingTargetStream
public static java.io.OutputStream resolveLoggingTargetStream(java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args)
-
resolveLoggingTargetStream
public static java.io.OutputStream resolveLoggingTargetStream(java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String[] args, int maxIndex)
-
setupLogging
public static java.util.logging.Handler setupLogging(java.util.logging.Level level, java.io.PrintStream stdout, java.io.PrintStream stderr, java.io.OutputStream outputStream)
-
-