blob: a971500eebd30edfe101bd50691db5a630ebdb1c [file] [log] [blame]
Damien Miller32aa1441999-10-29 09:15:49 +10001.\" -*- 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.\"
Damien Millerf1ce5052003-06-11 22:04:39 +100012.\" $OpenBSD: scp.1,v 1.28 2003/06/10 09:12:11 jmc Exp $
Damien Miller32aa1441999-10-29 09:15:49 +100013.\"
14.Dd September 25, 1999
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
Damien Miller495dca32003-04-01 21:42:14 +100022.Bk -words
Damien Miller8e121472003-01-24 11:37:38 +110023.Op Fl pqrvBC1246
Ben Lindstrom1e243242001-09-18 05:38:44 +000024.Op Fl F Ar ssh_config
Damien Miller7b28dc52000-09-05 13:34:53 +110025.Op Fl S Ar program
Damien Miller32aa1441999-10-29 09:15:49 +100026.Op Fl P Ar port
27.Op Fl c Ar cipher
28.Op Fl i Ar identity_file
Damien Miller8ee66a22003-02-24 11:50:50 +110029.Op Fl l Ar limit
Ben Lindstrom14c62eb2001-08-15 23:25:46 +000030.Op Fl o Ar ssh_option
Damien Miller32aa1441999-10-29 09:15:49 +100031.Sm off
32.Oo
33.Op Ar user@
34.Ar host1 No :
35.Oc Ns Ar file1
36.Sm on
37.Op Ar ...
38.Sm off
39.Oo
40.Op Ar user@
41.Ar host2 No :
42.Oc Ar file2
43.Sm on
Damien Miller495dca32003-04-01 21:42:14 +100044.Ek
Damien Miller22c77262000-04-13 12:26:34 +100045.Sh DESCRIPTION
Damien Miller32aa1441999-10-29 09:15:49 +100046.Nm
Damien Miller450a7a12000-03-26 13:04:51 +100047copies files between hosts on a network.
48It uses
Damien Miller32aa1441999-10-29 09:15:49 +100049.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
59Any file name may contain a host and user specification to indicate
Damien Miller450a7a12000-03-26 13:04:51 +100060that the file is to be copied to/from that host.
61Copies between two remote hosts are permitted.
Damien Miller32aa1441999-10-29 09:15:49 +100062.Pp
63The options are as follows:
64.Bl -tag -width Ds
65.It Fl c Ar cipher
Damien Miller450a7a12000-03-26 13:04:51 +100066Selects the cipher to use for encrypting the data transfer.
67This option is directly passed to
Damien Miller32aa1441999-10-29 09:15:49 +100068.Xr ssh 1 .
69.It Fl i Ar identity_file
70Selects the file from which the identity (private key) for RSA
Damien Miller450a7a12000-03-26 13:04:51 +100071authentication is read.
72This option is directly passed to
Damien Miller32aa1441999-10-29 09:15:49 +100073.Xr ssh 1 .
Damien Miller8ee66a22003-02-24 11:50:50 +110074.It Fl l Ar limit
75Limits the used bandwidth, specified in Kbit/s.
Damien Miller32aa1441999-10-29 09:15:49 +100076.It Fl p
77Preserves modification times, access times, and modes from the
78original file.
79.It Fl r
80Recursively copy entire directories.
81.It Fl v
Damien Miller450a7a12000-03-26 13:04:51 +100082Verbose mode.
83Causes
Damien Miller32aa1441999-10-29 09:15:49 +100084.Nm
Damien Miller22c77262000-04-13 12:26:34 +100085and
Damien Miller32aa1441999-10-29 09:15:49 +100086.Xr ssh 1
Damien Miller450a7a12000-03-26 13:04:51 +100087to print debugging messages about their progress.
88This is helpful in
Damien Miller32aa1441999-10-29 09:15:49 +100089debugging connection, authentication, and configuration problems.
90.It Fl B
91Selects batch mode (prevents asking for passwords or passphrases).
92.It Fl q
93Disables the progress meter.
94.It Fl C
Damien Miller450a7a12000-03-26 13:04:51 +100095Compression enable.
96Passes the
Damien Miller32aa1441999-10-29 09:15:49 +100097.Fl C
98flag to
99.Xr ssh 1
100to enable compression.
Ben Lindstrom1e243242001-09-18 05:38:44 +0000101.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 .
Damien Miller32aa1441999-10-29 09:15:49 +1000107.It Fl P Ar port
Damien Miller450a7a12000-03-26 13:04:51 +1000108Specifies the port to connect to on the remote host.
109Note that this option is written with a capital
Damien Miller32aa1441999-10-29 09:15:49 +1000110.Sq P ,
111because
112.Fl p
113is already reserved for preserving the times and modes of the file in
114.Xr rcp 1 .
Damien Miller7b28dc52000-09-05 13:34:53 +1100115.It Fl S Ar program
116Name of
117.Ar program
Damien Miller874d77b2000-10-14 16:23:11 +1100118to use for the encrypted connection.
119The program must understand
Damien Millerad833b32000-08-23 10:46:23 +1000120.Xr ssh 1
121options.
Ben Lindstrom14c62eb2001-08-15 23:25:46 +0000122.It Fl o Ar ssh_option
123Can be used to pass options to
124.Nm ssh
Ben Lindstrom3072aae2002-06-21 01:02:39 +0000125in the format used in
126.Xr ssh_config 5 .
127This is useful for specifying options
Ben Lindstrom14c62eb2001-08-15 23:25:46 +0000128for which there is no separate
129.Nm scp
Damien Miller2eb26e82003-02-24 11:51:32 +1100130command-line flag.
Damien Miller8e121472003-01-24 11:37:38 +1100131.It Fl 1
132Forces
133.Nm
134to use protocol 1.
135.It Fl 2
136Forces
137.Nm
138to use protocol 2.
Damien Miller34132e52000-01-14 15:45:46 +1100139.It Fl 4
140Forces
141.Nm
142to use IPv4 addresses only.
143.It Fl 6
144Forces
145.Nm
146to use IPv6 addresses only.
Damien Miller37023962000-07-11 17:31:38 +1000147.El
Damien Miller07a2d422002-02-05 12:16:15 +1100148.Sh DIAGNOSTICS
149.Nm
150exits with 0 on success or >0 if an error occurred.
Damien Miller32aa1441999-10-29 09:15:49 +1000151.Sh SEE ALSO
152.Xr rcp 1 ,
Damien Miller33804262001-02-04 23:20:18 +1100153.Xr sftp 1 ,
Damien Miller32aa1441999-10-29 09:15:49 +1000154.Xr ssh 1 ,
155.Xr ssh-add 1 ,
156.Xr ssh-agent 1 ,
157.Xr ssh-keygen 1 ,
Ben Lindstromc06bf702002-06-23 00:34:37 +0000158.Xr ssh_config 5 ,
Damien Miller32aa1441999-10-29 09:15:49 +1000159.Xr sshd 8
Damien Millerf1ce5052003-06-11 22:04:39 +1000160.Sh HISTORY
161.Nm
162is based on the
163.Xr rcp 1
164program in BSD source code from the Regents of the University of
165California.
166.Sh AUTHORS
167.An Timo Rinne Aq tri@iki.fi
168and
169.An Tatu Ylonen Aq ylo@cs.hut.fi