]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - crypto/openssh/scp.1
MFV r361280:
[FreeBSD/FreeBSD.git] / crypto / openssh / scp.1
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.81 2018/09/20 06:58:48 jmc Exp $
12 .\"
13 .Dd $Mdocdate: September 20 2018 $
14 .Dt SCP 1
15 .Os
16 .Sh NAME
17 .Nm scp
18 .Nd secure copy (remote file copy program)
19 .Sh SYNOPSIS
20 .Nm scp
21 .Op Fl 346BCpqrTv
22 .Op Fl c Ar cipher
23 .Op Fl F Ar ssh_config
24 .Op Fl i Ar identity_file
25 .Op Fl l Ar limit
26 .Op Fl o Ar ssh_option
27 .Op Fl P Ar port
28 .Op Fl S Ar program
29 .Ar source ... target
30 .Sh DESCRIPTION
31 .Nm
32 copies files between hosts on a network.
33 It uses
34 .Xr ssh 1
35 for data transfer, and uses the same authentication and provides the
36 same security as
37 .Xr ssh 1 .
38 .Nm
39 will ask for passwords or passphrases if they are needed for
40 authentication.
41 .Pp
42 The
43 .Ar source
44 and
45 .Ar target
46 may be specified as a local pathname, a remote host with optional path
47 in the form
48 .Sm off
49 .Oo user @ Oc host : Op path ,
50 .Sm on
51 or a URI in the form
52 .Sm off
53 .No scp:// Oo user @ Oc host Oo : port Oc Op / path .
54 .Sm on
55 Local file names can be made explicit using absolute or relative pathnames
56 to avoid
57 .Nm
58 treating file names containing
59 .Sq :\&
60 as host specifiers.
61 .Pp
62 When copying between two remote hosts, if the URI format is used, a
63 .Ar port
64 may only be specified on the
65 .Ar target
66 if the
67 .Fl 3
68 option is used.
69 .Pp
70 The options are as follows:
71 .Bl -tag -width Ds
72 .It Fl 3
73 Copies between two remote hosts are transferred through the local host.
74 Without this option the data is copied directly between the two remote
75 hosts.
76 Note that this option disables the progress meter.
77 .It Fl 4
78 Forces
79 .Nm
80 to use IPv4 addresses only.
81 .It Fl 6
82 Forces
83 .Nm
84 to use IPv6 addresses only.
85 .It Fl B
86 Selects batch mode (prevents asking for passwords or passphrases).
87 .It Fl C
88 Compression enable.
89 Passes the
90 .Fl C
91 flag to
92 .Xr ssh 1
93 to enable compression.
94 .It Fl c Ar cipher
95 Selects the cipher to use for encrypting the data transfer.
96 This option is directly passed to
97 .Xr ssh 1 .
98 .It Fl F Ar ssh_config
99 Specifies an alternative
100 per-user configuration file for
101 .Nm ssh .
102 This option is directly passed to
103 .Xr ssh 1 .
104 .It Fl i Ar identity_file
105 Selects the file from which the identity (private key) for public key
106 authentication is read.
107 This option is directly passed to
108 .Xr ssh 1 .
109 .It Fl l Ar limit
110 Limits the used bandwidth, specified in Kbit/s.
111 .It Fl o Ar ssh_option
112 Can be used to pass options to
113 .Nm ssh
114 in the format used in
115 .Xr ssh_config 5 .
116 This is useful for specifying options
117 for which there is no separate
118 .Nm scp
119 command-line flag.
120 For full details of the options listed below, and their possible values, see
121 .Xr ssh_config 5 .
122 .Pp
123 .Bl -tag -width Ds -offset indent -compact
124 .It AddressFamily
125 .It BatchMode
126 .It BindAddress
127 .It BindInterface
128 .It CanonicalDomains
129 .It CanonicalizeFallbackLocal
130 .It CanonicalizeHostname
131 .It CanonicalizeMaxDots
132 .It CanonicalizePermittedCNAMEs
133 .It CASignatureAlgorithms
134 .It CertificateFile
135 .It ChallengeResponseAuthentication
136 .It CheckHostIP
137 .It Ciphers
138 .It Compression
139 .It ConnectionAttempts
140 .It ConnectTimeout
141 .It ControlMaster
142 .It ControlPath
143 .It ControlPersist
144 .It GlobalKnownHostsFile
145 .It GSSAPIAuthentication
146 .It GSSAPIDelegateCredentials
147 .It HashKnownHosts
148 .It Host
149 .It HostbasedAuthentication
150 .It HostbasedKeyTypes
151 .It HostKeyAlgorithms
152 .It HostKeyAlias
153 .It HostName
154 .It IdentitiesOnly
155 .It IdentityAgent
156 .It IdentityFile
157 .It IPQoS
158 .It KbdInteractiveAuthentication
159 .It KbdInteractiveDevices
160 .It KexAlgorithms
161 .It LogLevel
162 .It MACs
163 .It NoHostAuthenticationForLocalhost
164 .It NumberOfPasswordPrompts
165 .It PasswordAuthentication
166 .It PKCS11Provider
167 .It Port
168 .It PreferredAuthentications
169 .It ProxyCommand
170 .It ProxyJump
171 .It PubkeyAcceptedKeyTypes
172 .It PubkeyAuthentication
173 .It RekeyLimit
174 .It SendEnv
175 .It ServerAliveInterval
176 .It ServerAliveCountMax
177 .It SetEnv
178 .It StrictHostKeyChecking
179 .It TCPKeepAlive
180 .It UpdateHostKeys
181 .It User
182 .It UserKnownHostsFile
183 .It VerifyHostKeyDNS
184 .El
185 .It Fl P Ar port
186 Specifies the port to connect to on the remote host.
187 Note that this option is written with a capital
188 .Sq P ,
189 because
190 .Fl p
191 is already reserved for preserving the times and modes of the file.
192 .It Fl p
193 Preserves modification times, access times, and modes from the
194 original file.
195 .It Fl q
196 Quiet mode: disables the progress meter as well as warning and diagnostic
197 messages from
198 .Xr ssh 1 .
199 .It Fl r
200 Recursively copy entire directories.
201 Note that
202 .Nm
203 follows symbolic links encountered in the tree traversal.
204 .It Fl S Ar program
205 Name of
206 .Ar program
207 to use for the encrypted connection.
208 The program must understand
209 .Xr ssh 1
210 options.
211 .It Fl T
212 Disable strict filename checking.
213 By default when copying files from a remote host to a local directory
214 .Nm
215 checks that the received filenames match those requested on the command-line
216 to prevent the remote end from sending unexpected or unwanted files.
217 Because of differences in how various operating systems and shells interpret
218 filename wildcards, these checks may cause wanted files to be rejected.
219 This option disables these checks at the expense of fully trusting that
220 the server will not send unexpected filenames.
221 .It Fl v
222 Verbose mode.
223 Causes
224 .Nm
225 and
226 .Xr ssh 1
227 to print debugging messages about their progress.
228 This is helpful in
229 debugging connection, authentication, and configuration problems.
230 .El
231 .Sh EXIT STATUS
232 .Ex -std scp
233 .Sh SEE ALSO
234 .Xr sftp 1 ,
235 .Xr ssh 1 ,
236 .Xr ssh-add 1 ,
237 .Xr ssh-agent 1 ,
238 .Xr ssh-keygen 1 ,
239 .Xr ssh_config 5 ,
240 .Xr sshd 8
241 .Sh HISTORY
242 .Nm
243 is based on the rcp program in
244 .Bx
245 source code from the Regents of the University of California.
246 .Sh AUTHORS
247 .An Timo Rinne Aq Mt tri@iki.fi
248 .An Tatu Ylonen Aq Mt ylo@cs.hut.fi