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 String
Command 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 boolean
isArgumentedOption
(String portOption, String argName) resolveClientEnvironment
(Map<String, ?> options) resolveClientEnvironment
(org.apache.sshd.common.PropertyResolver resolver) resolveClientPtyModes
(Map<String, ?> options) static org.apache.sshd.common.channel.PtyChannelConfiguration
resolveClientPtyOptions
(Map<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, String username, String host, int port, String proxyJump) static Path
static OutputStream
resolveLoggingTargetStream
(PrintStream stdout, PrintStream stderr, String... args) static OutputStream
resolveLoggingTargetStream
(PrintStream stdout, PrintStream stderr, String[] args, int maxIndex) static org.apache.sshd.client.SshClient
setupClient
(org.apache.sshd.common.PropertyResolver resolver, List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.cipher.Cipher>> ciphers, List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.mac.Mac>> macs, List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.compression.Compression>> compressions, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr, Level level, String[] args) static org.apache.sshd.client.session.ClientSession
setupClientSession
(String portOption, BufferedReader stdin, Level level, PrintStream stdout, PrintStream stderr, String... args) static org.apache.sshd.client.SshClient
setupDefaultClient
(org.apache.sshd.common.PropertyResolver resolver, Level level, PrintStream stdout, PrintStream stderr, String... args) static Handler
setupLogging
(Level level, PrintStream stdout, PrintStream stderr, OutputStream outputStream) static org.apache.sshd.client.keyverifier.ServerKeyVerifier
setupServerKeyVerifier
(org.apache.sshd.client.ClientAuthenticationManager manager, org.apache.sshd.common.PropertyResolver resolver, BufferedReader stdin, PrintStream stdout, PrintStream stderr) static void
setupSessionExtensions
(org.apache.sshd.common.kex.KexFactoryManager manager, org.apache.sshd.common.PropertyResolver resolver, BufferedReader stdin, PrintStream stdout, PrintStream stderr) static org.apache.sshd.common.keyprovider.FileKeyPairProvider
setupSessionIdentities
(org.apache.sshd.client.ClientFactoryManager client, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr) static org.apache.sshd.client.auth.keyboard.UserInteraction
setupSessionUserInteraction
(org.apache.sshd.client.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 org.apache.sshd.client.session.ClientSession setupClientSession(String portOption, BufferedReader stdin, Level level, PrintStream stdout, PrintStream stderr, String... args) throws Exception - Throws:
Exception
-
resolveHost
public static org.apache.sshd.client.config.hosts.HostConfigEntry resolveHost(org.apache.sshd.client.ClientFactoryManager client, String username, String host, int port, String proxyJump) throws IOException - Throws:
IOException
-
resolveIdentityFile
- Throws:
IOException
-
resolveClientEnvironment
-
resolveClientEnvironment
-
resolveClientPtyOptions
public static org.apache.sshd.common.channel.PtyChannelConfiguration resolveClientPtyOptions(org.apache.sshd.common.PropertyResolver resolver) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
resolveClientPtyOptions
public static org.apache.sshd.common.channel.PtyChannelConfiguration resolveClientPtyOptions(Map<String, ?> options) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
resolveClientPtyModes
public static Map<org.apache.sshd.common.channel.PtyMode,Integer> resolveClientPtyModes(Map<String, ?> options) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
setupDefaultClient
public static org.apache.sshd.client.SshClient setupDefaultClient(org.apache.sshd.common.PropertyResolver resolver, Level level, PrintStream stdout, PrintStream stderr, String... args) -
setupClient
public static org.apache.sshd.client.SshClient setupClient(org.apache.sshd.common.PropertyResolver resolver, List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.cipher.Cipher>> ciphers, List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.mac.Mac>> macs, List<org.apache.sshd.common.NamedFactory<org.apache.sshd.common.compression.Compression>> compressions, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr, Level level, String[] args) throws Exception - Throws:
Exception
-
setupSessionIdentities
public static org.apache.sshd.common.keyprovider.FileKeyPairProvider setupSessionIdentities(org.apache.sshd.client.ClientFactoryManager client, Collection<? extends Path> identities, BufferedReader stdin, PrintStream stdout, PrintStream stderr) throws Throwable - Throws:
Throwable
-
setupSessionUserInteraction
public static org.apache.sshd.client.auth.keyboard.UserInteraction setupSessionUserInteraction(org.apache.sshd.client.ClientAuthenticationManager client, BufferedReader stdin, PrintStream stdout, PrintStream stderr) -
setupSessionExtensions
public static void setupSessionExtensions(org.apache.sshd.common.kex.KexFactoryManager manager, org.apache.sshd.common.PropertyResolver resolver, BufferedReader stdin, PrintStream stdout, PrintStream stderr) throws Exception - Throws:
Exception
-
setupServerKeyVerifier
public static org.apache.sshd.client.keyverifier.ServerKeyVerifier setupServerKeyVerifier(org.apache.sshd.client.ClientAuthenticationManager manager, org.apache.sshd.common.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)
-