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