scp.1 (1323ec571215a77ddd21294f0871979d5ad6b992) scp.1 (fb5aabcb990bdc9a2359f56b714795da0d79416d)
1.\"
2.\" scp.1
3.\"
4.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
5.\"
6.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7.\" All rights reserved
8.\"
9.\" Created: Sun May 7 00:14:37 1995 ylo
10.\"
1.\"
2.\" scp.1
3.\"
4.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
5.\"
6.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7.\" All rights reserved
8.\"
9.\" Created: Sun May 7 00:14:37 1995 ylo
10.\"
11.\" $OpenBSD: scp.1,v 1.107 2022/02/10 04:12:38 djm Exp $
11.\" $OpenBSD: scp.1,v 1.108 2022/02/23 21:21:16 djm Exp $
12.\"
12.\"
13.Dd $Mdocdate: February 10 2022 $
13.Dd $Mdocdate: February 23 2022 $
14.Dt SCP 1
15.Os
16.Sh NAME
17.Nm scp
18.Nd OpenSSH secure file copy
19.Sh SYNOPSIS
20.Nm scp
21.Op Fl 346ABCOpqRrsTv

--- 49 unchanged lines hidden (view full) ---

71option is used.
72.Pp
73The options are as follows:
74.Bl -tag -width Ds
75.It Fl 3
76Copies between two remote hosts are transferred through the local host.
77Without this option the data is copied directly between the two remote
78hosts.
14.Dt SCP 1
15.Os
16.Sh NAME
17.Nm scp
18.Nd OpenSSH secure file copy
19.Sh SYNOPSIS
20.Nm scp
21.Op Fl 346ABCOpqRrsTv

--- 49 unchanged lines hidden (view full) ---

71option is used.
72.Pp
73The options are as follows:
74.Bl -tag -width Ds
75.It Fl 3
76Copies between two remote hosts are transferred through the local host.
77Without this option the data is copied directly between the two remote
78hosts.
79Note that, when using the original SCP protocol (the default), this option
79Note that, when using the legacy SCP protocol (via the
80.Fl O
81flag), this option
80selects batch mode for the second host as
81.Nm
82cannot ask for passwords or passphrases for both hosts.
83This mode is the default.
84.It Fl 4
85Forces
86.Nm
87to use IPv4 addresses only.

--- 16 unchanged lines hidden (view full) ---

104.Xr ssh 1
105to enable compression.
106.It Fl c Ar cipher
107Selects the cipher to use for encrypting the data transfer.
108This option is directly passed to
109.Xr ssh 1 .
110.It Fl D Ar sftp_server_path
111When using the SFTP protocol support via
82selects batch mode for the second host as
83.Nm
84cannot ask for passwords or passphrases for both hosts.
85This mode is the default.
86.It Fl 4
87Forces
88.Nm
89to use IPv4 addresses only.

--- 16 unchanged lines hidden (view full) ---

106.Xr ssh 1
107to enable compression.
108.It Fl c Ar cipher
109Selects the cipher to use for encrypting the data transfer.
110This option is directly passed to
111.Xr ssh 1 .
112.It Fl D Ar sftp_server_path
113When using the SFTP protocol support via
112.Fl s ,
114.Fl M ,
113connect directly to a local SFTP server program rather than a
114remote one via
115.Xr ssh 1 .
116This option may be useful in debugging the client and server.
117.It Fl F Ar ssh_config
118Specifies an alternative
119per-user configuration file for
120.Nm ssh .

--- 15 unchanged lines hidden (view full) ---

136This is a shortcut to specify a
137.Cm ProxyJump
138configuration directive.
139This option is directly passed to
140.Xr ssh 1 .
141.It Fl l Ar limit
142Limits the used bandwidth, specified in Kbit/s.
143.It Fl O
115connect directly to a local SFTP server program rather than a
116remote one via
117.Xr ssh 1 .
118This option may be useful in debugging the client and server.
119.It Fl F Ar ssh_config
120Specifies an alternative
121per-user configuration file for
122.Nm ssh .

--- 15 unchanged lines hidden (view full) ---

138This is a shortcut to specify a
139.Cm ProxyJump
140configuration directive.
141This option is directly passed to
142.Xr ssh 1 .
143.It Fl l Ar limit
144Limits the used bandwidth, specified in Kbit/s.
145.It Fl O
144Use the original SCP protocol for file transfers instead of the SFTP protocol.
146Use the legacy SCP protocol for file transfers instead of the SFTP protocol.
145Forcing the use of the SCP protocol may be necessary for servers that do
146not implement SFTP, for backwards-compatibility for particular filename
147wildcard patterns and for expanding paths with a
148.Sq ~
149prefix for older SFTP servers.
147Forcing the use of the SCP protocol may be necessary for servers that do
148not implement SFTP, for backwards-compatibility for particular filename
149wildcard patterns and for expanding paths with a
150.Sq ~
151prefix for older SFTP servers.
150This mode is the default.
151.It Fl o Ar ssh_option
152Can be used to pass options to
153.Nm ssh
154in the format used in
155.Xr ssh_config 5 .
156This is useful for specifying options
157for which there is no separate
158.Nm scp

--- 93 unchanged lines hidden (view full) ---

252follows symbolic links encountered in the tree traversal.
253.It Fl S Ar program
254Name of
255.Ar program
256to use for the encrypted connection.
257The program must understand
258.Xr ssh 1
259options.
152.It Fl o Ar ssh_option
153Can be used to pass options to
154.Nm ssh
155in the format used in
156.Xr ssh_config 5 .
157This is useful for specifying options
158for which there is no separate
159.Nm scp

--- 93 unchanged lines hidden (view full) ---

253follows symbolic links encountered in the tree traversal.
254.It Fl S Ar program
255Name of
256.Ar program
257to use for the encrypted connection.
258The program must understand
259.Xr ssh 1
260options.
260.It Fl s
261Use the SFTP protocol for transfers rather than the original scp protocol.
262.It Fl T
263Disable strict filename checking.
264By default when copying files from a remote host to a local directory
265.Nm
266checks that the received filenames match those requested on the command-line
267to prevent the remote end from sending unexpected or unwanted files.
268Because of differences in how various operating systems and shells interpret
269filename wildcards, these checks may cause wanted files to be rejected.

--- 20 unchanged lines hidden (view full) ---

290.Xr ssh_config 5 ,
291.Xr sftp-server 8 ,
292.Xr sshd 8
293.Sh HISTORY
294.Nm
295is based on the rcp program in
296.Bx
297source code from the Regents of the University of California.
261.It Fl T
262Disable strict filename checking.
263By default when copying files from a remote host to a local directory
264.Nm
265checks that the received filenames match those requested on the command-line
266to prevent the remote end from sending unexpected or unwanted files.
267Because of differences in how various operating systems and shells interpret
268filename wildcards, these checks may cause wanted files to be rejected.

--- 20 unchanged lines hidden (view full) ---

289.Xr ssh_config 5 ,
290.Xr sftp-server 8 ,
291.Xr sshd 8
292.Sh HISTORY
293.Nm
294is based on the rcp program in
295.Bx
296source code from the Regents of the University of California.
297.Pp
298Since OpenSSH 9.0,
299.Nm
300has use the SFTP protocol for transfers by default.
298.Sh AUTHORS
299.An Timo Rinne Aq Mt tri@iki.fi
300.An Tatu Ylonen Aq Mt ylo@cs.hut.fi
301.Sh CAVEATS
301.Sh AUTHORS
302.An Timo Rinne Aq Mt tri@iki.fi
303.An Tatu Ylonen Aq Mt ylo@cs.hut.fi
304.Sh CAVEATS
302The original SCP protocol (used by default) requires execution of the
303remote user's shell to perform
305The legacy SCP protocol (selected by the
306.Fl O
307flag) requires execution of the remote user's shell to perform
304.Xr glob 3
305pattern matching.
306This requires careful quoting of any characters that have special meaning to
307the remote shell, such as quote characters.
308.Xr glob 3
309pattern matching.
310This requires careful quoting of any characters that have special meaning to
311the remote shell, such as quote characters.