modification times, access times, and file mode bits
from the source file.
-q Quiet mode: disables the progress meter as well as warning and
diagnostic messages from ssh(1).
-R Copies between two remote hosts are performed by connecting to
the origin host and executing scp there. This requires that scp
running on the origin host can authenticate to the destination
host without requiring a password.
-r Recursively copy entire directories. Note that scp follows sym‐
bolic links encountered in the tree traversal.
-S program
Name of program to use for the encrypted connection. The pro‐
gram must understand ssh(1) options.
-T Disable strict filename checking. By default when copying files
from a remote host to a local directory scp checks that the re‐
ceived filenames match those requested on the command‐line to
prevent the remote end from sending unexpected or unwanted
files. Because of differences in how various operating systems
and shells interpret filename wildcards, these checks may cause
wanted files to be rejected. This option disables these checks
at the expense of fully trusting that the server will not send
unexpected filenames.
-v Verbose mode. Causes scp and ssh(1) to print debugging messages
about their progress. This is helpful in debugging connection,
authentication, and configuration problems.
-X sftp_option
Specify an option that controls aspects of SFTP protocol behav‐
iour. The valid options are:
nrequests=value
Controls how many concurrent SFTP read or write requests
may be in progress at any point in time during a down‐
load or upload. By default 64 requests may be active
concurrently.
buffer=value
Controls the maximum buffer size for a single SFTP
read/write operation used during download or upload. By
default a 32KB buffer is used.
EXIT STATUS
The scp utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
sftp(1), ssh(1), ssh‐add(1), ssh‐agent(1), ssh‐keygen(1), ssh_config(5),
sftp‐server(8), sshd(8)
HISTORY
scp is based on the rcp program in BSD source code from the Regents of
the University of California.
Since OpenSSH 9.0, scp has used the SFTP protocol for transfers by de‐
fault.
AUTHORS
Timo Rinne <tri@iki.fi>
Tatu Ylonen <ylo@cs.hut.fi>
CAVEATS
The legacy SCP protocol (selected by the -O flag) requires execution of
the remote user’s shell to perform glob(3) pattern matching. This re‐
quires careful quoting of any characters that have special meaning to
the remote shell, such as quote characters.
Debian December 16, 2022 SCP(1)