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