4 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7 .\" All rights reserved
9 .\" Created: Sun May 7 00:14:37 1995 ylo
11 .\" $OpenBSD: scp.1,v 1.105 2021/09/20 06:53:56 djm Exp $
13 .Dd $Mdocdate: September 20 2021 $
18 .Nd OpenSSH secure file copy
23 .Op Fl D Ar sftp_server_path
24 .Op Fl F Ar ssh_config
25 .Op Fl i Ar identity_file
26 .Op Fl J Ar destination
28 .Op Fl o Ar ssh_option
34 copies files between hosts on a network.
38 for data transfer, and uses the same authentication and provides the
39 same security as a login session.
42 will ask for passwords or passphrases if they are needed for
49 may be specified as a local pathname, a remote host with optional path
52 .Oo user @ Oc host : Op path ,
56 .No scp:// Oo user @ Oc host Oo : port Oc Op / path .
58 Local file names can be made explicit using absolute or relative pathnames
61 treating file names containing
65 When copying between two remote hosts, if the URI format is used, a
67 cannot be specified on the
73 The options are as follows:
76 Copies between two remote hosts are transferred through the local host.
77 Without this option the data is copied directly between the two remote
79 Note that, when using the original SCP protocol (the default), this option
80 selects batch mode for the second host as
82 cannot ask for passwords or passphrases for both hosts.
83 This mode is the default.
87 to use IPv4 addresses only.
91 to use IPv6 addresses only.
96 The default is not to forward an authentication agent.
98 Selects batch mode (prevents asking for passwords or passphrases).
105 to enable compression.
107 Selects the cipher to use for encrypting the data transfer.
108 This option is directly passed to
110 .It Fl D Ar sftp_server_path
111 When using the SFTP protocol support via
113 connect directly to a local SFTP server program rather than a
116 This option may be useful in debugging the client and server.
117 .It Fl F Ar ssh_config
118 Specifies an alternative
119 per-user configuration file for
121 This option is directly passed to
123 .It Fl i Ar identity_file
124 Selects the file from which the identity (private key) for public key
125 authentication is read.
126 This option is directly passed to
128 .It Fl J Ar destination
129 Connect to the target host by first making an
131 connection to the jump host described by
133 and then establishing a TCP forwarding to the ultimate destination from
135 Multiple jump hops may be specified separated by comma characters.
136 This is a shortcut to specify a
138 configuration directive.
139 This option is directly passed to
142 Limits the used bandwidth, specified in Kbit/s.
144 Use the original SCP protocol for file transfers instead of the SFTP protocol.
145 Forcing the use of the SCP protocol may be necessary for servers that do
146 not implement SFTP, for backwards-compatibility for particular filename
147 wildcard patterns and for expanding paths with a
149 prefix for older SFTP servers.
150 This mode is the default.
151 .It Fl o Ar ssh_option
152 Can be used to pass options to
154 in the format used in
156 This is useful for specifying options
157 for which there is no separate
160 For full details of the options listed below, and their possible values, see
163 .Bl -tag -width Ds -offset indent -compact
169 .It CanonicalizeFallbackLocal
170 .It CanonicalizeHostname
171 .It CanonicalizeMaxDots
172 .It CanonicalizePermittedCNAMEs
173 .It CASignatureAlgorithms
178 .It ConnectionAttempts
183 .It GlobalKnownHostsFile
184 .It GSSAPIAuthentication
185 .It GSSAPIDelegateCredentials
188 .It HostbasedAcceptedAlgorithms
189 .It HostbasedAuthentication
190 .It HostKeyAlgorithms
197 .It KbdInteractiveAuthentication
198 .It KbdInteractiveDevices
200 .It KnownHostsCommand
203 .It NoHostAuthenticationForLocalhost
204 .It NumberOfPasswordPrompts
205 .It PasswordAuthentication
208 .It PreferredAuthentications
211 .It PubkeyAcceptedAlgorithms
212 .It PubkeyAuthentication
215 .It ServerAliveInterval
216 .It ServerAliveCountMax
218 .It StrictHostKeyChecking
222 .It UserKnownHostsFile
226 Specifies the port to connect to on the remote host.
227 Note that this option is written with a capital
231 is already reserved for preserving the times and mode bits of the file.
233 Preserves modification times, access times, and file mode bits from the
236 Quiet mode: disables the progress meter as well as warning and diagnostic
240 Copies between two remote hosts are performed by connecting to the origin
246 running on the origin host can authenticate to the destination host without
247 requiring a password.
249 Recursively copy entire directories.
252 follows symbolic links encountered in the tree traversal.
256 to use for the encrypted connection.
257 The program must understand
261 Use the SFTP protocol for transfers rather than the original scp protocol.
263 Disable strict filename checking.
264 By default when copying files from a remote host to a local directory
266 checks that the received filenames match those requested on the command-line
267 to prevent the remote end from sending unexpected or unwanted files.
268 Because of differences in how various operating systems and shells interpret
269 filename wildcards, these checks may cause wanted files to be rejected.
270 This option disables these checks at the expense of fully trusting that
271 the server will not send unexpected filenames.
278 to print debugging messages about their progress.
280 debugging connection, authentication, and configuration problems.
295 is based on the rcp program in
297 source code from the Regents of the University of California.
299 .An Timo Rinne Aq Mt tri@iki.fi
300 .An Tatu Ylonen Aq Mt ylo@cs.hut.fi
302 The original SCP protocol (used by default) requires execution of the
303 remote user's shell to perform
306 This requires careful quoting of any characters that have special meaning to
307 the remote shell, such as quote characters.