'\" 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 "Jun 22, 2007"
.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
.na
\fB\fB-4\fR\fR
.ad
.RS 20n
Forces \fBscp\fR to use IPv4 addresses only.
.RE

.sp
.ne 2
.na
\fB\fB-6\fR\fR
.ad
.RS 20n
Forces \fBscp\fR to use IPv6 addresses only.
.RE

.sp
.ne 2
.na
\fB\fB-B\fR\fR
.ad
.RS 20n
Selects batch mode. (Prevents asking for passwords or passphrases.)
.RE

.sp
.ne 2
.na
\fB\fB-c\fR \fIcipher\fR\fR
.ad
.RS 20n
Selects the cipher to use for encrypting the data transfer. This option is
directly passed to \fBssh\fR(1).
.RE

.sp
.ne 2
.na
\fB\fB-C\fR\fR
.ad
.RS 20n
Compression enable. Passes the \fB-C\fR flag to \fBssh\fR(1) to enable
compression.
.RE

.sp
.ne 2
.na
\fB\fB-F\fR \fIssh_config\fR\fR
.ad
.RS 20n
Specifies an alternative per-user configuration file for \fBssh\fR(1.).
.RE

.sp
.ne 2
.na
\fB\fB-i\fR \fIidentity_file\fR\fR
.ad
.RS 20n
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
.na
\fB\fB-o\fR \fIssh_option\fR\fR
.ad
.RS 20n
The given option is directly passed to \fBssh\fR(1).
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 20n
Preserves modification times, access times, and modes from the original file.
.RE

.sp
.ne 2
.na
\fB\fB-P\fR \fIport\fR\fR
.ad
.RS 20n
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
.na
\fB\fB-q\fR\fR
.ad
.RS 20n
Disables the progress meter.
.RE

.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 20n
Recursively copies entire directories.
.RE

.sp
.ne 2
.na
\fB\fB-S\fR \fIprogram\fR\fR
.ad
.RS 20n
Specifies the name of the program to use for the encrypted connection. The
program must understand \fBssh\fR(1) options.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 20n
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
.na
\fB\fIhost1, host2,\fR...\fR
.ad
.RS 20n
The name(s) of the host from or to which the file is to be copied.
.RE

.sp
.ne 2
.na
\fB\fIfile1, file2,\fR...\fR
.ad
.RS 20n
The file(s) to be copied.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Successful completion.
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
An error occurred.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.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.