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