xref: /netbsd-src/crypto/external/bsd/openssh/dist/scp.1 (revision 413d532bcc3f62d122e56d92e13ac64825a40baf)
1.\"	$NetBSD: scp.1,v 1.7 2013/11/08 19:18:25 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.59 2013/07/16 00:07:52 schwarze Exp $
14.\"
15.Dd July 16 2013
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 No :
36.Oc 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 3
81Copies between two remote hosts are transferred through the local host.
82Without this option the data is copied directly between the two remote
83hosts.
84Note that this option disables the progress meter.
85.It Fl 4
86Forces
87.Nm
88to use IPv4 addresses only.
89.It Fl 6
90Forces
91.Nm
92to use IPv6 addresses only.
93.It Fl B
94Selects batch mode (prevents asking for passwords or passphrases).
95.It Fl C
96Compression enable.
97Passes the
98.Fl C
99flag to
100.Xr ssh 1
101to enable compression.
102.It Fl c Ar cipher
103Selects the cipher to use for encrypting the data transfer.
104This option is directly passed to
105.Xr ssh 1 .
106.It Fl F Ar ssh_config
107Specifies an alternative
108per-user configuration file for
109.Nm ssh .
110This option is directly passed to
111.Xr ssh 1 .
112.It Fl i Ar identity_file
113Selects the file from which the identity (private key) for public key
114authentication is read.
115This option is directly passed to
116.Xr ssh 1 .
117.It Fl l Ar limit
118Limits the used bandwidth, specified in Kbit/s.
119.It Fl o Ar ssh_option
120Can be used to pass options to
121.Nm ssh
122in the format used in
123.Xr ssh_config 5 .
124This is useful for specifying options
125for which there is no separate
126.Nm scp
127command-line flag.
128For full details of the options listed below, and their possible values, see
129.Xr ssh_config 5 .
130.Pp
131.Bl -tag -width Ds -offset indent -compact
132.It AddressFamily
133.It BatchMode
134.It BindAddress
135.It ChallengeResponseAuthentication
136.It CheckHostIP
137.It Cipher
138.It Ciphers
139.It Compression
140.It CompressionLevel
141.It ConnectionAttempts
142.It ConnectTimeout
143.It ControlMaster
144.It ControlPath
145.It ControlPersist
146.It GlobalKnownHostsFile
147.It GSSAPIAuthentication
148.It GSSAPIDelegateCredentials
149.It HashKnownHosts
150.It Host
151.It HostbasedAuthentication
152.It HostKeyAlgorithms
153.It HostKeyAlias
154.It HostName
155.It IdentityFile
156.It IdentitiesOnly
157.It IPQoS
158.It KbdInteractiveAuthentication
159.It KbdInteractiveDevices
160.It KexAlgorithms
161.It LogLevel
162.It MACs
163.It NoHostAuthenticationForLocalhost
164.It NumberOfPasswordPrompts
165.It PasswordAuthentication
166.It PKCS11Provider
167.It Port
168.It PreferredAuthentications
169.It Protocol
170.It ProxyCommand
171.It PubkeyAuthentication
172.It RekeyLimit
173.It RhostsRSAAuthentication
174.It RSAAuthentication
175.It SendEnv
176.It ServerAliveInterval
177.It ServerAliveCountMax
178.It StrictHostKeyChecking
179.It TCPKeepAlive
180.It UsePrivilegedPort
181.It User
182.It UserKnownHostsFile
183.It VerifyHostKeyDNS
184.El
185.It Fl P Ar port
186Specifies the port to connect to on the remote host.
187Note that this option is written with a capital
188.Sq P ,
189because
190.Fl p
191is already reserved for preserving the times and modes of the file in
192.Xr rcp 1 .
193.It Fl p
194Preserves modification times, access times, and modes from the
195original file.
196.It Fl q
197Quiet mode: disables the progress meter as well as warning and diagnostic
198messages from
199.Xr ssh 1 .
200.It Fl r
201Recursively copy entire directories.
202Note that
203.Nm
204follows symbolic links encountered in the tree traversal.
205.It Fl S Ar program
206Name of
207.Ar program
208to use for the encrypted connection.
209The program must understand
210.Xr ssh 1
211options.
212.It Fl v
213Verbose mode.
214Causes
215.Nm
216and
217.Xr ssh 1
218to print debugging messages about their progress.
219This is helpful in
220debugging connection, authentication, and configuration problems.
221.El
222.Sh EXIT STATUS
223.Ex -std scp
224.Sh SEE ALSO
225.Xr rcp 1 ,
226.Xr sftp 1 ,
227.Xr ssh 1 ,
228.Xr ssh-add 1 ,
229.Xr ssh-agent 1 ,
230.Xr ssh-keygen 1 ,
231.Xr ssh_config 5 ,
232.Xr sshd 8
233.Sh HISTORY
234.Nm
235is based on the
236.Xr rcp 1
237program in BSD source code from the Regents of the University of
238California.
239.Sh AUTHORS
240.An Timo Rinne Aq Mt tri@iki.fi
241.An Tatu Ylonen Aq Mt ylo@cs.hut.fi
242