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
  15 
  16 .SH DESCRIPTION
  17 .LP
  18 The \fBscp\fR utility copies files between hosts on a network. It uses
  19 \fBssh\fR(1) for data transfer, and uses the same authentication and provides
  20 the same security as \fBssh\fR(1). Unlike \fBrcp\fR(1), \fBscp\fR will ask for
  21 passwords or passphrases if they are needed for authentication.
  22 .sp
  23 .LP
  24 Any file name may contain a host and user specification to indicate that the
  25 file is to be copied to/from that host. Copies between two remote hosts are
  26 permitted.
  27 .SH OPTIONS
  28 .LP
  29 The following options are supported:
  30 .sp
  31 .ne 2
  32 .na
  33 \fB\fB-4\fR\fR
  34 .ad
  35 .RS 20n
  36 Forces \fBscp\fR to use IPv4 addresses only.
  37 .RE
  38 
  39 .sp
  40 .ne 2
  41 .na
  42 \fB\fB-6\fR\fR
  43 .ad
  44 .RS 20n
  45 Forces \fBscp\fR to use IPv6 addresses only.
  46 .RE
  47 
  48 .sp
  49 .ne 2
  50 .na
  51 \fB\fB-B\fR\fR
  52 .ad
  53 .RS 20n
  54 Selects batch mode. (Prevents asking for passwords or passphrases.)
  55 .RE
  56 
  57 .sp
  58 .ne 2
  59 .na
  60 \fB\fB-c\fR \fIcipher\fR\fR
  61 .ad
  62 .RS 20n
  63 Selects the cipher to use for encrypting the data transfer. This option is
  64 directly passed to \fBssh\fR(1).
  65 .RE
  66 
  67 .sp
  68 .ne 2
  69 .na
  70 \fB\fB-C\fR\fR
  71 .ad
  72 .RS 20n
  73 Compression enable. Passes the \fB-C\fR flag to \fBssh\fR(1) to enable
  74 compression.
  75 .RE
  76 
  77 .sp
  78 .ne 2
  79 .na
  80 \fB\fB-F\fR \fIssh_config\fR\fR
  81 .ad
  82 .RS 20n
  83 Specifies an alternative per-user configuration file for \fBssh\fR(1.).
  84 .RE
  85 
  86 .sp
  87 .ne 2
  88 .na
  89 \fB\fB-i\fR \fIidentity_file\fR\fR
  90 .ad
  91 .RS 20n
  92 Selects the file from which the identity (private key) for \fBRSA\fR
  93 authentication is read. This option is directly passed to \fBssh\fR(1).
  94 .RE
  95 
  96 .sp
  97 .ne 2
  98 .na
  99 \fB\fB-o\fR \fIssh_option\fR\fR
 100 .ad
 101 .RS 20n
 102 The given option is directly passed to \fBssh\fR(1).
 103 .RE
 104 
 105 .sp
 106 .ne 2
 107 .na
 108 \fB\fB-p\fR\fR
 109 .ad
 110 .RS 20n
 111 Preserves modification times, access times, and modes from the original file.
 112 .RE
 113 
 114 .sp
 115 .ne 2
 116 .na
 117 \fB\fB-P\fR \fIport\fR\fR
 118 .ad
 119 .RS 20n
 120 Specifies the port to connect to on the remote host. Notice that this option is
 121 written with a capital `P', because \fB-p\fR is already reserved for preserving
 122 the times and modes of the file in \fBrcp\fR(1).
 123 .RE
 124 
 125 .sp
 126 .ne 2
 127 .na
 128 \fB\fB-q\fR\fR
 129 .ad
 130 .RS 20n
 131 Disables the progress meter.
 132 .RE
 133 
 134 .sp
 135 .ne 2
 136 .na
 137 \fB\fB-r\fR\fR
 138 .ad
 139 .RS 20n
 140 Recursively copies entire directories.
 141 .RE
 142 
 143 .sp
 144 .ne 2
 145 .na
 146 \fB\fB-S\fR \fIprogram\fR\fR
 147 .ad
 148 .RS 20n
 149 Specifies the name of the program to use for the encrypted connection. The
 150 program must understand \fBssh\fR(1) options.
 151 .RE
 152 
 153 .sp
 154 .ne 2
 155 .na
 156 \fB\fB-v\fR\fR
 157 .ad
 158 .RS 20n
 159 Verbose mode. Causes \fBscp\fR and \fBssh\fR(1) to print debugging messages
 160 about their progress. This is helpful in debugging connection, authentication,
 161 and configuration problems.
 162 .RE
 163 
 164 .SH OPERANDS
 165 .LP
 166 The following operands are supported:
 167 .sp
 168 .ne 2
 169 .na
 170 \fB\fIhost1, host2,\fR...\fR
 171 .ad
 172 .RS 20n
 173 The name(s) of the host from or to which the file is to be copied.
 174 .RE
 175 
 176 .sp
 177 .ne 2
 178 .na
 179 \fB\fIfile1, file2,\fR...\fR
 180 .ad
 181 .RS 20n
 182 The file(s) to be copied.
 183 .RE
 184 
 185 .SH EXIT STATUS
 186 .LP
 187 The following exit values are returned:
 188 .sp
 189 .ne 2
 190 .na
 191 \fB\fB0\fR\fR
 192 .ad
 193 .RS 5n
 194 Successful completion.
 195 .RE
 196 
 197 .sp
 198 .ne 2
 199 .na
 200 \fB\fB1\fR\fR
 201 .ad
 202 .RS 5n
 203 An error occurred.
 204 .RE
 205 
 206 .SH ATTRIBUTES
 207 .LP
 208 See \fBattributes\fR(5) for descriptions of the following attributes:
 209 .sp
 210 
 211 .sp
 212 .TS
 213 box;
 214 c | c
 215 l | l .
 216 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 217 _
 218 Interface Stability     Evolving
 219 .TE
 220 
 221 .SH SEE ALSO
 222 .LP
 223 \fBrcp\fR(1), \fBssh\fR(1), \fBssh-add\fR(1), \fBssh-agent\fR(1),
 224 \fBssh-keygen\fR(1), \fBsshd\fR(1M), \fBssh_config\fR(4), \fBattributes\fR(5)
 225 .SH NOTES
 226 .LP
 227 Generally, use of \fBscp\fR with password or keyboard-interactive
 228 authentication  method and two remote hosts does not work. It does work with
 229 either the \fBpubkey\fR,  \fBhostbased\fR or \fBgssapi-keyex\fR authentication
 230 method. For the \fBpubkey\fR authentication  method, either private keys not
 231 protected by a passphrase, or an explicit \fBssh\fR  agent forwarding have to
 232 be used. The \fBgssapi-keyex\fR authentication method  works with the
 233 \fBkerberos_v5\fR GSS-API mechanism, but only if  the
 234 \fBGSSAPIDelegateCredentials\fR option is enabled.