scpg3 — Secure Shell file copy client - Generation 3
scpg3
(sshg3.exe
on Windows) is used to
securely copy files over the network. scpg3
launches
ssh-broker-g3
to provide a secure transport using the
Secure Shell version 2 protocol.
ssh-broker-g3
will ask for passwords or passphrases if they
are needed for authentication. scpg3
uses the configuration
specified in the ssh-broker-config.xml
file.
Any filename may contain a host, user, and port specification to
indicate that the file is to be copied to or from that host. Copies
between two remote hosts are permitted. The remote host(s) must be
running a Secure Shell version 2 server with the sftp-server
subsystem enabled.
The host
parameter can optionally be
enclosed in square brackets ([]
) to allow the use of
semicolons. The
file
argument can contain simple wild cards:
asterisk (*
) for any number of characters and question mark
(?
) for any one character.
The following command-line parameters can be used to further specify
the scpg3
options.
-d
Forces target to be a directory.
-q
Uses quiet mode (only fatal errors are shown).
-Q
Does not show progress indicator.
-p
Preserves file attributes and timestamps.
-u, --unlink-source
Removes source files after copying (file move).
-B, --batch-mode
Uses batch mode.
-I, --interactive
Prompts whether to overwrite an existing destination file (does not
work with -B
).
--overwrite
[={yes|no}
]Decides whether to overwrite existing destination file(s) (default:
yes
).
-r
Recurses subdirectories.
--checksum[=yes|no|md5|sha1|md5-force|sha1-force|checkpoint]
Uses MD5 or SHA-1 checksums or a separate checkpoint database to
determine the point in the file where file transfer can be resumed. Files
smaller than buffer_size
are not checked. Use
md5-force
or sha1-force
with small files (default:
yes
, i.e. use MD5 checksums).
-W, --whole-file
Does not try incremental checks (default: no
, i.e. try
incremental checks).
--checkpoint=s<seconds>
Time interval between checkpoint updates (default: 10 seconds).
--checkpoint=b<bytes>
Byte interval between checkpoint updates (default: 10 MB).
--streaming[=yes|no|force]
Uses streaming in file transfer, if server supports it. Files
smaller than buffer_size
are not transferred using streaming.
Use force
with small files (default: yes
).
-O, --offset=r<offset>|w<offset>|l<length>|t<length>
Sets offset. Offset r<offset>
specifies the start
offset in the source file. Offset w<offset>
specifies
the start offset in the destination file. Length
l<length>
specifies the amount of data to be copied.
Truncate length t<length>
, if given, specifies the
length to which the destination file is truncated or expanded after the
file data has been copied.
-a[arg]
Transfers files in ASCII mode. See manual page for description of optional argument.
--force-lower-case
Destination filename will be converted to lowercase characters.
--prefix=PREFIX
Adds prefix to filename during the file transfer. The prefix is removed after the file has been successfully transferred.
-P
port
Connects to this Secure Shell port on the remote machine (default: 22
).
-b
buffer_size
Defines maximum buffer size for one request (default: 32768
bytes).
-N
max_requests
Defines maximum number of requests sent in parallel (default:
10
).
--fips
Uses the FIPS mode.
--plugin-path=
PATH
Sets plugin path to PATH
. This is only used in the FIPS mode.
--statistics=yes|no|simple
Chooses the statistics style (default: yes
).
-V, --version
Displays version string and exits.
-h, --help
Displays help and exits.
scpg3
returns the following values based on the
success of the operation:
0 Operation was successful. 1 Internal error. 2 Connection aborted by the user. 3 Destination is not a directory, but a directory was specified by the user. 4 Connecting to the host failed. 5 Connection lost. 6 File does not exist. 7 No permission to access file. 8 Undetermined error from sshfilexfer. 101 Wrong command-line arguments specified by the user.