1.\"  -*- nroff -*-
2.\"
3.\" scp.1
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\"                    All rights reserved
9.\"
10.\" Created: Sun May  7 00:14:37 1995 ylo
11.\"
12.\" $MirOS: src/usr.bin/ssh/scp.1,v 1.11 2009/10/02 16:58:48 tg Exp $
13.\" $OpenBSD: scp.1,v 1.46 2008/07/12 05:33:41 djm Exp $
14.\"
15.Dd $Mdocdate: October 2 2009 $
16.Dt SCP 1
17.Os
18.Sh NAME
19.Nm scp
20.Nd secure copy (remote file copy program)
21.Sh SYNOPSIS
22.Nm scp
23.Bk -words
24.Op Fl 1246BCpqrv
25.Op Fl c Ar cipher
26.Op Fl F Ar ssh_config
27.Op Fl i Ar identity_file
28.Op Fl l Ar limit
29.Op Fl o Ar ssh_option
30.Op Fl P Ar port
31.Op Fl S Ar program
32.Sm off
33.Oo
34.Op Ar user No @
35.Ar host1 No :
36.Oc Ns Ar file1
37.Sm on
38.Ar ...
39.Sm off
40.Oo
41.Op Ar user No @
42.Ar host2 No :
43.Oc Ar file2
44.Sm on
45.Ek
46.Sh DESCRIPTION
47.Nm
48copies files between hosts on a network.
49It uses
50.Xr ssh 1
51for data transfer, and uses the same authentication and provides the
52same security as
53.Xr ssh 1 .
54Unlike
55.Xr rcp 1 ,
56.Nm
57will ask for passwords or passphrases if they are needed for
58authentication.
59.Pp
60File names may contain a user and host specification to indicate
61that the file is to be copied to/from that host.
62Local file names can be made explicit using absolute or relative pathnames
63to avoid
64.Nm
65treating file names containing
66.Sq :\&
67as host specifiers.
68Copies between two remote hosts are also permitted.
69.Pp
70The options are as follows:
71.Bl -tag -width Ds
72.It Fl 1
73Forces
74.Nm
75to use protocol 1.
76.It Fl 2
77Forces
78.Nm
79to use protocol 2.
80.It Fl 4
81Forces
82.Nm
83to use IPv4 addresses only.
84.It Fl 6
85Forces
86.Nm
87to use IPv6 addresses only.
88.It Fl B
89Selects batch mode (prevents asking for passwords or passphrases).
90.It Fl C
91Compression enable.
92Passes the
93.Fl C
94flag to
95.Xr ssh 1
96to enable compression.
97.It Fl c Ar cipher
98Selects the cipher to use for encrypting the data transfer.
99This option is directly passed to
100.Xr ssh 1 .
101.It Fl F Ar ssh_config
102Specifies an alternative
103per-user configuration file for
104.Nm ssh .
105This option is directly passed to
106.Xr ssh 1 .
107.It Fl i Ar identity_file
108Selects the file from which the identity (private key) for public key
109authentication is read.
110This option is directly passed to
111.Xr ssh 1 .
112.It Fl l Ar limit
113Limits the used bandwidth, specified in Kbit/s.
114.It Fl o Ar ssh_option
115Can be used to pass options to
116.Nm ssh
117in the format used in
118.Xr ssh_config 5 .
119This is useful for specifying options
120for which there is no separate
121.Nm scp
122command-line flag.
123For full details of the options listed below, and their possible values, see
124.Xr ssh_config 5 .
125.Pp
126.Bl -tag -width Ds -offset indent -compact
127.It AddressFamily
128.It BatchMode
129.It BindAddress
130.It ChallengeResponseAuthentication
131.It CheckHostIP
132.It Cipher
133.It Ciphers
134.It Compression
135.It CompressionLevel
136.It ConnectionAttempts
137.It ConnectTimeout
138.It ControlMaster
139.It ControlPath
140.It GlobalKnownHostsFile
141.It HashKnownHosts
142.It Host
143.It HostbasedAuthentication
144.It HostKeyAlgorithms
145.It HostKeyAlias
146.It Hostname
147.It IdentityFile
148.It IdentitiesOnly
149.It KbdInteractiveDevices
150.It LogLevel
151.It MACs
152.It NoHostAuthenticationForLocalhost
153.It NumberOfPasswordPrompts
154.It PasswordAuthentication
155.It Port
156.It PreferredAuthentications
157.It Protocol
158.It ProxyCommand
159.It PubkeyAuthentication
160.It RekeyLimit
161.It RhostsRSAAuthentication
162.It RSAAuthentication
163.It SendEnv
164.It ServerAliveInterval
165.It ServerAliveCountMax
166.It SmartcardDevice
167.It StrictHostKeyChecking
168.It TCPKeepAlive
169.It UsePrivilegedPort
170.It User
171.It UserKnownHostsFile
172.It VerifyHostKeyDNS
173.El
174.It Fl P Ar port
175Specifies the port to connect to on the remote host.
176Note that this option is written with a capital
177.Sq P ,
178because
179.Fl p
180is already reserved for preserving the times and modes of the file in
181.Xr rcp 1 .
182.It Fl p
183Preserves modification times, access times, and modes from the
184original file.
185.It Fl q
186Quiet mode: disables the progress meter as well as warning and diagnostic
187messages from
188.Xr ssh 1 .
189.It Fl r
190Recursively copy entire directories.
191Note that
192.Nm
193follows symbolic links encountered in the tree traversal.
194.It Fl S Ar program
195Name of
196.Ar program
197to use for the encrypted connection.
198The program must understand
199.Xr ssh 1
200options.
201.It Fl v
202Verbose mode.
203Causes
204.Nm
205and
206.Xr ssh 1
207to print debugging messages about their progress.
208This is helpful in
209debugging connection, authentication, and configuration problems.
210.El
211.Pp
212.Ex -std scp
213.Sh SEE ALSO
214.Xr rcp 1 ,
215.Xr sftp 1 ,
216.Xr ssh 1 ,
217.Xr ssh-add 1 ,
218.Xr ssh-agent 1 ,
219.Xr ssh-keygen 1 ,
220.Xr ssh_config 5 ,
221.Xr sshd 8
222.Sh HISTORY
223.Nm
224is based on the
225.Xr rcp 1
226program in BSD source code from the Regents of the University of
227California.
228.Sh AUTHORS
229.An Timo Rinne Aq tri@iki.fi
230.An Tatu Ylonen Aq ylo@cs.hut.fi
231