6447 handful of nvpair cleanups
[unleashed.git] / usr / src / man / man1 / scp.1
blobc2b44aa6b9f49aca2daa2735ffb77341eb081983
1 '\" te
2 .\" 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
3 .\" installed location.
4 .\" Portions Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved.
5 .TH SCP 1 "Jun 22, 2007"
6 .SH NAME
7 scp \- secure copy (remote file copy program)
8 .SH SYNOPSIS
9 .LP
10 .nf
11 \fBscp\fR [\fB-pqrvBC46\fR] [\fB-F\fR \fIssh_config\fR] [\fB-S\fR \fIprogram\fR] [\fB-P\fR \fIport\fR]
12      [\fB-c\fR \fIcipher\fR] [\fB-i\fR \fIidentity_file\fR] [\fB-o\fR \fIssh_option\fR]
13      [ [\fIuser\fR@]\fIhost1\fR:]\fIfile1\fR []... [ [\fIuser\fR@]\fIhost2\fR:]\fIfile2\fR
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 The \fBscp\fR utility copies files between hosts on a network. It uses
20 \fBssh\fR(1) for data transfer, and uses the same authentication and provides
21 the same security as \fBssh\fR(1). Unlike \fBrcp\fR(1), \fBscp\fR will ask for
22 passwords or passphrases if they are needed for authentication.
23 .sp
24 .LP
25 Any file name may contain a host and user specification to indicate that the
26 file is to be copied to/from that host. Copies between two remote hosts are
27 permitted.
28 .SH OPTIONS
29 .sp
30 .LP
31 The following options are supported:
32 .sp
33 .ne 2
34 .na
35 \fB\fB-4\fR\fR
36 .ad
37 .RS 20n
38 Forces \fBscp\fR to use IPv4 addresses only.
39 .RE
41 .sp
42 .ne 2
43 .na
44 \fB\fB-6\fR\fR
45 .ad
46 .RS 20n
47 Forces \fBscp\fR to use IPv6 addresses only.
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fB-B\fR\fR
54 .ad
55 .RS 20n
56 Selects batch mode. (Prevents asking for passwords or passphrases.)
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fB-c\fR \fIcipher\fR\fR
63 .ad
64 .RS 20n
65 Selects the cipher to use for encrypting the data transfer. This option is
66 directly passed to \fBssh\fR(1).
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fB\fB-C\fR\fR
73 .ad
74 .RS 20n
75 Compression enable. Passes the \fB-C\fR flag to \fBssh\fR(1) to enable
76 compression.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fB-F\fR \fIssh_config\fR\fR
83 .ad
84 .RS 20n
85 Specifies an alternative per-user configuration file for \fBssh\fR(1.).
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fB-i\fR \fIidentity_file\fR\fR
92 .ad
93 .RS 20n
94 Selects the file from which the identity (private key) for \fBRSA\fR
95 authentication is read. This option is directly passed to \fBssh\fR(1).
96 .RE
98 .sp
99 .ne 2
101 \fB\fB-o\fR \fIssh_option\fR\fR
103 .RS 20n
104 The given option is directly passed to \fBssh\fR(1).
108 .ne 2
110 \fB\fB-p\fR\fR
112 .RS 20n
113 Preserves modification times, access times, and modes from the original file.
117 .ne 2
119 \fB\fB-P\fR \fIport\fR\fR
121 .RS 20n
122 Specifies the port to connect to on the remote host. Notice that this option is
123 written with a capital `P', because \fB-p\fR is already reserved for preserving
124 the times and modes of the file in \fBrcp\fR(1).
128 .ne 2
130 \fB\fB-q\fR\fR
132 .RS 20n
133 Disables the progress meter.
137 .ne 2
139 \fB\fB-r\fR\fR
141 .RS 20n
142 Recursively copies entire directories.
146 .ne 2
148 \fB\fB-S\fR \fIprogram\fR\fR
150 .RS 20n
151 Specifies the name of the program to use for the encrypted connection. The
152 program must understand \fBssh\fR(1) options.
156 .ne 2
158 \fB\fB-v\fR\fR
160 .RS 20n
161 Verbose mode. Causes \fBscp\fR and \fBssh\fR(1) to print debugging messages
162 about their progress. This is helpful in debugging connection, authentication,
163 and configuration problems.
166 .SH OPERANDS
169 The following operands are supported:
171 .ne 2
173 \fB\fIhost1, host2,\fR...\fR
175 .RS 20n
176 The name(s) of the host from or to which the file is to be copied.
180 .ne 2
182 \fB\fIfile1, file2,\fR...\fR
184 .RS 20n
185 The file(s) to be copied.
188 .SH EXIT STATUS
191 The following exit values are returned:
193 .ne 2
195 \fB\fB0\fR\fR
197 .RS 5n
198 Successful completion.
202 .ne 2
204 \fB\fB1\fR\fR
206 .RS 5n
207 An error occurred.
210 .SH ATTRIBUTES
213 See \fBattributes\fR(5) for descriptions of the following attributes:
218 box;
219 c | c
220 l | l .
221 ATTRIBUTE TYPE  ATTRIBUTE VALUE
223 Interface Stability     Evolving
226 .SH SEE ALSO
229 \fBrcp\fR(1), \fBssh\fR(1), \fBssh-add\fR(1), \fBssh-agent\fR(1),
230 \fBssh-keygen\fR(1), \fBsshd\fR(1M), \fBssh_config\fR(4), \fBattributes\fR(5)
231 .SH NOTES
234 Generally, use of \fBscp\fR with password or keyboard-interactive
235 authentication  method and two remote hosts does not work. It does work with
236 either the \fBpubkey\fR,  \fBhostbased\fR or \fBgssapi-keyex\fR authentication
237 method. For the \fBpubkey\fR authentication  method, either private keys not
238 protected by a passphrase, or an explicit \fBssh\fR  agent forwarding have to
239 be used. The \fBgssapi-keyex\fR authentication method  works with the
240 \fBkerberos_v5\fR GSS-API mechanism, but only if  the
241 \fBGSSAPIDelegateCredentials\fR option is enabled.