Package org.apache.sshd.cli.client
Class ScpCommandMain
- java.lang.Object
-
- org.apache.sshd.cli.CliSupport
-
- org.apache.sshd.cli.client.SshClientCliSupport
-
- org.apache.sshd.cli.client.ScpCommandMain
-
public class ScpCommandMain extends SshClientCliSupport
- See Also:
- SCP(1) - manual page
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SCP_PORT_OPTION
Command line option used to indicate a non-default portstatic java.lang.String
SCP_REMOTE_TO_REMOTE_OPTION
Copies between two remote hosts are transferred through the local host-
Fields inherited from class org.apache.sshd.cli.client.SshClientCliSupport
SSH_CLIENT_PORT_OPTION
-
Fields inherited from class org.apache.sshd.cli.CliSupport
DEFAULT_IO_SERVICE_FACTORY
-
-
Constructor Summary
Constructors Constructor Description ScpCommandMain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
adjustRemoteTargetArguments(org.apache.sshd.scp.common.ScpLocation remote, org.apache.sshd.scp.common.ScpLocation source, org.apache.sshd.scp.common.ScpLocation target, java.util.Collection<java.lang.String> effective)
static void
main(java.lang.String[] args)
static java.lang.String[]
normalizeCommandArguments(java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args)
static java.util.Set<org.apache.sshd.scp.client.ScpClient.Option>
parseCopyOptions(java.lang.String[] args)
static org.apache.sshd.scp.client.ScpClientCreator
resolveScpClientCreator(java.io.PrintStream stderr, java.lang.String... args)
static void
showUsageMessage(java.io.PrintStream stderr)
static void
xferLocalToRemote(java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String[] args, org.apache.sshd.scp.common.ScpLocation source, org.apache.sshd.scp.common.ScpLocation target, java.util.Collection<org.apache.sshd.scp.client.ScpClient.Option> options, java.io.OutputStream logStream, java.util.logging.Level level, boolean quiet)
static void
xferRemoteToRemote(java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String[] args, org.apache.sshd.scp.common.ScpLocation source, org.apache.sshd.scp.common.ScpLocation target, java.util.Collection<org.apache.sshd.scp.client.ScpClient.Option> options, java.io.OutputStream logStream, java.util.logging.Level level, boolean quiet)
-
Methods inherited from class org.apache.sshd.cli.client.SshClientCliSupport
isArgumentedOption, resolveClientEnvironment, resolveClientEnvironment, resolveClientPtyModes, resolveClientPtyOptions, resolveClientPtyOptions, resolveHost, resolveIdentityFile, resolveLoggingTargetStream, resolveLoggingTargetStream, setupClient, setupClientSession, setupDefaultClient, setupLogging, setupServerKeyVerifier, setupSessionExtensions, setupSessionIdentities, setupSessionUserInteraction
-
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
-
SCP_PORT_OPTION
public static final java.lang.String SCP_PORT_OPTION
Command line option used to indicate a non-default port- See Also:
- Constant Field Values
-
SCP_REMOTE_TO_REMOTE_OPTION
public static final java.lang.String SCP_REMOTE_TO_REMOTE_OPTION
Copies between two remote hosts are transferred through the local host- See Also:
- Constant Field Values
-
-
Method Detail
-
normalizeCommandArguments
public static java.lang.String[] normalizeCommandArguments(java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String... args)
-
adjustRemoteTargetArguments
private static void adjustRemoteTargetArguments(org.apache.sshd.scp.common.ScpLocation remote, org.apache.sshd.scp.common.ScpLocation source, org.apache.sshd.scp.common.ScpLocation target, java.util.Collection<java.lang.String> effective)
-
resolveScpClientCreator
public static org.apache.sshd.scp.client.ScpClientCreator resolveScpClientCreator(java.io.PrintStream stderr, java.lang.String... args)
-
parseCopyOptions
public static java.util.Set<org.apache.sshd.scp.client.ScpClient.Option> parseCopyOptions(java.lang.String[] args)
-
showUsageMessage
public static void showUsageMessage(java.io.PrintStream stderr)
-
xferLocalToRemote
public static void xferLocalToRemote(java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String[] args, org.apache.sshd.scp.common.ScpLocation source, org.apache.sshd.scp.common.ScpLocation target, java.util.Collection<org.apache.sshd.scp.client.ScpClient.Option> options, java.io.OutputStream logStream, java.util.logging.Level level, boolean quiet) throws java.lang.Exception
- Throws:
java.lang.Exception
-
xferRemoteToRemote
public static void xferRemoteToRemote(java.io.BufferedReader stdin, java.io.PrintStream stdout, java.io.PrintStream stderr, java.lang.String[] args, org.apache.sshd.scp.common.ScpLocation source, org.apache.sshd.scp.common.ScpLocation target, java.util.Collection<org.apache.sshd.scp.client.ScpClient.Option> options, java.io.OutputStream logStream, java.util.logging.Level level, boolean quiet) throws java.lang.Exception
- Throws:
java.lang.Exception
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-