1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
'\" te
.\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the
.\" installed location.
.\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.TH scp 1 "22 Jun 2007" "SunOS 5.11" "User Commands"
.SH NAME
scp \- secure copy (remote file copy program)
.SH SYNOPSIS
.LP
.nf
\fBscp\fR [\fB-pqrvBC46\fR] [\fB-F\fR \fIssh_config\fR] [\fB-S\fR \fIprogram\fR] [\fB-P\fR \fIport\fR]
[\fB-c\fR \fIcipher\fR] [\fB-i\fR \fIidentity_file\fR] [\fB-o\fR \fIssh_option\fR]
[ [\fIuser\fR@]\fIhost1\fR:]\fIfile1\fR []... [ [\fIuser\fR@]\fIhost2\fR:]\fIfile2\fR
.fi
.SH DESCRIPTION
.sp
.LP
The \fBscp\fR utility copies files between hosts on a network. It uses
\fBssh\fR(1) for data transfer, and uses the same authentication and provides
the same security as \fBssh\fR(1). Unlike \fBrcp\fR(1), \fBscp\fR will ask for
passwords or passphrases if they are needed for authentication.
.sp
.LP
Any file name may contain a host and user specification to indicate that the
file is to be copied to/from that host. Copies between two remote hosts are
permitted.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.mk
.na
\fB\fB-4\fR\fR
.ad
.RS 20n
.rt
Forces \fBscp\fR to use IPv4 addresses only.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-6\fR\fR
.ad
.RS 20n
.rt
Forces \fBscp\fR to use IPv6 addresses only.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-B\fR\fR
.ad
.RS 20n
.rt
Selects batch mode. (Prevents asking for passwords or passphrases.)
.RE
.sp
.ne 2
.mk
.na
\fB\fB-c\fR \fIcipher\fR\fR
.ad
.RS 20n
.rt
Selects the cipher to use for encrypting the data transfer. This option is
directly passed to \fBssh\fR(1).
.RE
.sp
.ne 2
.mk
.na
\fB\fB-C\fR\fR
.ad
.RS 20n
.rt
Compression enable. Passes the \fB-C\fR flag to \fBssh\fR(1) to enable
compression.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-F\fR \fIssh_config\fR\fR
.ad
.RS 20n
.rt
Specifies an alternative per-user configuration file for \fBssh\fR(1.).
.RE
.sp
.ne 2
.mk
.na
\fB\fB-i\fR \fIidentity_file\fR\fR
.ad
.RS 20n
.rt
Selects the file from which the identity (private key) for \fBRSA\fR
authentication is read. This option is directly passed to \fBssh\fR(1).
.RE
.sp
.ne 2
.mk
.na
\fB\fB-o\fR \fIssh_option\fR\fR
.ad
.RS 20n
.rt
The given option is directly passed to \fBssh\fR(1).
.RE
.sp
.ne 2
.mk
.na
\fB\fB-p\fR\fR
.ad
.RS 20n
.rt
Preserves modification times, access times, and modes from the original file.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-P\fR \fIport\fR\fR
.ad
.RS 20n
.rt
Specifies the port to connect to on the remote host. Notice that this option is
written with a capital `P', because \fB-p\fR is already reserved for preserving
the times and modes of the file in \fBrcp\fR(1).
.RE
.sp
.ne 2
.mk
.na
\fB\fB-q\fR\fR
.ad
.RS 20n
.rt
Disables the progress meter.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-r\fR\fR
.ad
.RS 20n
.rt
Recursively copies entire directories.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-S\fR \fIprogram\fR\fR
.ad
.RS 20n
.rt
Specifies the name of the program to use for the encrypted connection. The
program must understand \fBssh\fR(1) options.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-v\fR\fR
.ad
.RS 20n
.rt
Verbose mode. Causes \fBscp\fR and \fBssh\fR(1) to print debugging messages
about their progress. This is helpful in debugging connection, authentication,
and configuration problems.
.RE
.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.mk
.na
\fB\fIhost1, host2,\fR...\fR
.ad
.RS 20n
.rt
The name(s) of the host from or to which the file is to be copied.
.RE
.sp
.ne 2
.mk
.na
\fB\fIfile1, file2,\fR...\fR
.ad
.RS 20n
.rt
The file(s) to be copied.
.RE
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.mk
.na
\fB\fB0\fR\fR
.ad
.RS 5n
.rt
Successful completion.
.RE
.sp
.ne 2
.mk
.na
\fB\fB1\fR\fR
.ad
.RS 5n
.rt
An error occurred.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityEvolving
.TE
.SH SEE ALSO
.sp
.LP
\fBrcp\fR(1), \fBssh\fR(1), \fBssh-add\fR(1), \fBssh-agent\fR(1),
\fBssh-keygen\fR(1), \fBsshd\fR(1M), \fBssh_config\fR(4), \fBattributes\fR(5)
.SH NOTES
.sp
.LP
Generally, use of \fBscp\fR with password or keyboard-interactive
authentication method and two remote hosts does not work. It does work with
either the \fBpubkey\fR, \fBhostbased\fR or \fBgssapi-keyex\fR authentication
method. For the \fBpubkey\fR authentication method, either private keys not
protected by a passphrase, or an explicit \fBssh\fR agent forwarding have to
be used. The \fBgssapi-keyex\fR authentication method works with the
\fBkerberos_v5\fR GSS-API mechanism, but only if the
\fBGSSAPIDelegateCredentials\fR option is enabled.
|