1180740SdesSCP(1)                     OpenBSD Reference Manual                     SCP(1)
2180740Sdes
3180740SdesNAME
4180740Sdes     scp - secure copy (remote file copy program)
5180740Sdes
6180740SdesSYNOPSIS
7218767Sdes     scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
8180740Sdes         [-l limit] [-o ssh_option] [-P port] [-S program]
9214979Sdes         [[user@]host1:]file1 ... [[user@]host2:]file2
10180740Sdes
11180740SdesDESCRIPTION
12180740Sdes     scp copies files between hosts on a network.  It uses ssh(1) for data
13180740Sdes     transfer, and uses the same authentication and provides the same security
14180740Sdes     as ssh(1).  Unlike rcp(1), scp will ask for passwords or passphrases if
15180740Sdes     they are needed for authentication.
16180740Sdes
17180746Sdes     File names may contain a user and host specification to indicate that the
18214979Sdes     file is to be copied to/from that host.  Local file names can be made
19214979Sdes     explicit using absolute or relative pathnames to avoid scp treating file
20180746Sdes     names containing `:' as host specifiers.  Copies between two remote hosts
21180746Sdes     are also permitted.
22180740Sdes
23180740Sdes     The options are as follows:
24180740Sdes
25180740Sdes     -1      Forces scp to use protocol 1.
26180740Sdes
27180740Sdes     -2      Forces scp to use protocol 2.
28180740Sdes
29218767Sdes     -3      Copies between two remote hosts are transferred through the local
30218767Sdes             host.  Without this option the data is copied directly between
31218767Sdes             the two remote hosts.  Note that this option disables the
32218767Sdes             progress meter.
33218767Sdes
34180740Sdes     -4      Forces scp to use IPv4 addresses only.
35180740Sdes
36180740Sdes     -6      Forces scp to use IPv6 addresses only.
37180740Sdes
38214979Sdes     -B      Selects batch mode (prevents asking for passwords or
39214979Sdes             passphrases).
40180740Sdes
41214979Sdes     -C      Compression enable.  Passes the -C flag to ssh(1) to enable
42214979Sdes             compression.
43180740Sdes
44180740Sdes     -c cipher
45180740Sdes             Selects the cipher to use for encrypting the data transfer.  This
46180740Sdes             option is directly passed to ssh(1).
47180740Sdes
48180740Sdes     -F ssh_config
49180740Sdes             Specifies an alternative per-user configuration file for ssh.
50180740Sdes             This option is directly passed to ssh(1).
51180740Sdes
52180740Sdes     -i identity_file
53180750Sdes             Selects the file from which the identity (private key) for public
54180750Sdes             key authentication is read.  This option is directly passed to
55180740Sdes             ssh(1).
56180740Sdes
57180740Sdes     -l limit
58180740Sdes             Limits the used bandwidth, specified in Kbit/s.
59180740Sdes
60180740Sdes     -o ssh_option
61180740Sdes             Can be used to pass options to ssh in the format used in
62180740Sdes             ssh_config(5).  This is useful for specifying options for which
63180740Sdes             there is no separate scp command-line flag.  For full details of
64180740Sdes             the options listed below, and their possible values, see
65180740Sdes             ssh_config(5).
66180740Sdes
67180740Sdes                   AddressFamily
68180740Sdes                   BatchMode
69180740Sdes                   BindAddress
70180740Sdes                   ChallengeResponseAuthentication
71180740Sdes                   CheckHostIP
72180740Sdes                   Cipher
73180740Sdes                   Ciphers
74180740Sdes                   Compression
75180740Sdes                   CompressionLevel
76180740Sdes                   ConnectionAttempts
77180740Sdes                   ConnectTimeout
78180740Sdes                   ControlMaster
79180740Sdes                   ControlPath
80239844Sdes                   ControlPersist
81180740Sdes                   GlobalKnownHostsFile
82180740Sdes                   GSSAPIAuthentication
83180740Sdes                   GSSAPIDelegateCredentials
84180740Sdes                   HashKnownHosts
85180740Sdes                   Host
86180740Sdes                   HostbasedAuthentication
87180740Sdes                   HostKeyAlgorithms
88180740Sdes                   HostKeyAlias
89180740Sdes                   HostName
90180740Sdes                   IdentityFile
91180740Sdes                   IdentitiesOnly
92218767Sdes                   IPQoS
93239844Sdes                   KbdInteractiveAuthentication
94180740Sdes                   KbdInteractiveDevices
95218767Sdes                   KexAlgorithms
96180740Sdes                   LogLevel
97180740Sdes                   MACs
98180740Sdes                   NoHostAuthenticationForLocalhost
99180740Sdes                   NumberOfPasswordPrompts
100180740Sdes                   PasswordAuthentication
101204861Sdes                   PKCS11Provider
102180740Sdes                   Port
103180740Sdes                   PreferredAuthentications
104180740Sdes                   Protocol
105180740Sdes                   ProxyCommand
106180740Sdes                   PubkeyAuthentication
107180740Sdes                   RekeyLimit
108180740Sdes                   RhostsRSAAuthentication
109180740Sdes                   RSAAuthentication
110180740Sdes                   SendEnv
111180740Sdes                   ServerAliveInterval
112180740Sdes                   ServerAliveCountMax
113180740Sdes                   StrictHostKeyChecking
114180740Sdes                   TCPKeepAlive
115180740Sdes                   UsePrivilegedPort
116180740Sdes                   User
117180740Sdes                   UserKnownHostsFile
118180740Sdes                   VerifyHostKeyDNS
119180740Sdes
120180740Sdes     -P port
121180740Sdes             Specifies the port to connect to on the remote host.  Note that
122180740Sdes             this option is written with a capital `P', because -p is already
123180740Sdes             reserved for preserving the times and modes of the file in
124180740Sdes             rcp(1).
125180740Sdes
126180740Sdes     -p      Preserves modification times, access times, and modes from the
127180740Sdes             original file.
128180740Sdes
129180746Sdes     -q      Quiet mode: disables the progress meter as well as warning and
130180746Sdes             diagnostic messages from ssh(1).
131180740Sdes
132214979Sdes     -r      Recursively copy entire directories.  Note that scp follows
133214979Sdes             symbolic links encountered in the tree traversal.
134180740Sdes
135180740Sdes     -S program
136180740Sdes             Name of program to use for the encrypted connection.  The program
137180740Sdes             must understand ssh(1) options.
138180740Sdes
139180740Sdes     -v      Verbose mode.  Causes scp and ssh(1) to print debugging messages
140180740Sdes             about their progress.  This is helpful in debugging connection,
141180740Sdes             authentication, and configuration problems.
142180740Sdes
143218767SdesEXIT STATUS
144180740Sdes     The scp utility exits 0 on success, and >0 if an error occurs.
145180740Sdes
146180740SdesSEE ALSO
147180740Sdes     rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
148180740Sdes     ssh_config(5), sshd(8)
149180740Sdes
150180740SdesHISTORY
151180740Sdes     scp is based on the rcp(1) program in BSD source code from the Regents of
152180740Sdes     the University of California.
153180740Sdes
154180740SdesAUTHORS
155180740Sdes     Timo Rinne <tri@iki.fi>
156180740Sdes     Tatu Ylonen <ylo@cs.hut.fi>
157180740Sdes
158255670SdesOpenBSD 5.4                      July 16, 2013                     OpenBSD 5.4
159