1 SCP(1) General Commands Manual SCP(1)
4 scp M-bM-^@M-^S secure copy (remote file copy program)
7 scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
8 [-l limit] [-o ssh_option] [-P port] [-S program] source ... target
11 scp copies files between hosts on a network. It uses ssh(1) for data
12 transfer, and uses the same authentication and provides the same security
13 as ssh(1). scp will ask for passwords or passphrases if they are needed
16 The source and target may be specified as a local pathname, a remote host
17 with optional path in the form [user@]host:[path], or a URI in the form
18 scp://[user@]host[:port][/path]. Local file names can be made explicit
19 using absolute or relative pathnames to avoid scp treating file names
20 containing M-bM-^@M-^X:M-bM-^@M-^Y as host specifiers.
22 When copying between two remote hosts, if the URI format is used, a port
23 may only be specified on the target if the -3 option is used.
25 The options are as follows:
27 -3 Copies between two remote hosts are transferred through the local
28 host. Without this option the data is copied directly between
29 the two remote hosts. Note that this option disables the
32 -4 Forces scp to use IPv4 addresses only.
34 -6 Forces scp to use IPv6 addresses only.
36 -B Selects batch mode (prevents asking for passwords or
39 -C Compression enable. Passes the -C flag to ssh(1) to enable
43 Selects the cipher to use for encrypting the data transfer. This
44 option is directly passed to ssh(1).
47 Specifies an alternative per-user configuration file for ssh.
48 This option is directly passed to ssh(1).
51 Selects the file from which the identity (private key) for public
52 key authentication is read. This option is directly passed to
56 Limits the used bandwidth, specified in Kbit/s.
59 Can be used to pass options to ssh in the format used in
60 ssh_config(5). This is useful for specifying options for which
61 there is no separate scp command-line flag. For full details of
62 the options listed below, and their possible values, see
70 CanonicalizeFallbackLocal
73 CanonicalizePermittedCNAMEs
75 ChallengeResponseAuthentication
86 GSSAPIDelegateCredentials
89 HostbasedAuthentication
98 KbdInteractiveAuthentication
103 NoHostAuthenticationForLocalhost
104 NumberOfPasswordPrompts
105 PasswordAuthentication
108 PreferredAuthentications
111 PubkeyAcceptedKeyTypes
118 StrictHostKeyChecking
126 Specifies the port to connect to on the remote host. Note that
127 this option is written with a capital M-bM-^@M-^XPM-bM-^@M-^Y, because -p is already
128 reserved for preserving the times and modes of the file.
130 -p Preserves modification times, access times, and modes from the
133 -q Quiet mode: disables the progress meter as well as warning and
134 diagnostic messages from ssh(1).
136 -r Recursively copy entire directories. Note that scp follows
137 symbolic links encountered in the tree traversal.
140 Name of program to use for the encrypted connection. The program
141 must understand ssh(1) options.
143 -v Verbose mode. Causes scp and ssh(1) to print debugging messages
144 about their progress. This is helpful in debugging connection,
145 authentication, and configuration problems.
148 The scp utility exitsM-BM- 0 on success, andM-BM- >0 if an error occurs.
151 sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5),
155 scp is based on the rcp program in BSD source code from the Regents of
156 the University of California.
159 Timo Rinne <tri@iki.fi>
160 Tatu Ylonen <ylo@cs.hut.fi>
162 OpenBSD 6.4 July 19, 2018 OpenBSD 6.4