blob: 10e67aa33d1cfb576886017065948d61d3ddb402 [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 Miller33804262001-02-04 23:20:18 +110012.\" $OpenBSD: scp.1,v 1.14 2001/02/04 11:11:53 djm 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 Miller34132e52000-01-14 15:45:46 +110022.Op Fl pqrvC46
Damien Miller7b28dc52000-09-05 13:34:53 +110023.Op Fl S Ar program
Damien Miller32aa1441999-10-29 09:15:49 +100024.Op Fl P Ar port
25.Op Fl c Ar cipher
26.Op Fl i Ar identity_file
Damien Miller874d77b2000-10-14 16:23:11 +110027.Op Fl o Ar option
Damien Miller32aa1441999-10-29 09:15:49 +100028.Sm off
29.Oo
30.Op Ar user@
31.Ar host1 No :
32.Oc Ns Ar file1
33.Sm on
34.Op Ar ...
35.Sm off
36.Oo
37.Op Ar user@
38.Ar host2 No :
39.Oc Ar file2
40.Sm on
Damien Miller22c77262000-04-13 12:26:34 +100041.Sh DESCRIPTION
Damien Miller32aa1441999-10-29 09:15:49 +100042.Nm
Damien Miller450a7a12000-03-26 13:04:51 +100043copies files between hosts on a network.
44It uses
Damien Miller32aa1441999-10-29 09:15:49 +100045.Xr ssh 1
46for data transfer, and uses the same authentication and provides the
47same security as
48.Xr ssh 1 .
49Unlike
50.Xr rcp 1 ,
51.Nm
52will ask for passwords or passphrases if they are needed for
53authentication.
54.Pp
55Any file name may contain a host and user specification to indicate
Damien Miller450a7a12000-03-26 13:04:51 +100056that the file is to be copied to/from that host.
57Copies between two remote hosts are permitted.
Damien Miller32aa1441999-10-29 09:15:49 +100058.Pp
59The options are as follows:
60.Bl -tag -width Ds
61.It Fl c Ar cipher
Damien Miller450a7a12000-03-26 13:04:51 +100062Selects the cipher to use for encrypting the data transfer.
63This option is directly passed to
Damien Miller32aa1441999-10-29 09:15:49 +100064.Xr ssh 1 .
65.It Fl i Ar identity_file
66Selects the file from which the identity (private key) for RSA
Damien Miller450a7a12000-03-26 13:04:51 +100067authentication is read.
68This option is directly passed to
Damien Miller32aa1441999-10-29 09:15:49 +100069.Xr ssh 1 .
70.It Fl p
71Preserves modification times, access times, and modes from the
72original file.
73.It Fl r
74Recursively copy entire directories.
75.It Fl v
Damien Miller450a7a12000-03-26 13:04:51 +100076Verbose mode.
77Causes
Damien Miller32aa1441999-10-29 09:15:49 +100078.Nm
Damien Miller22c77262000-04-13 12:26:34 +100079and
Damien Miller32aa1441999-10-29 09:15:49 +100080.Xr ssh 1
Damien Miller450a7a12000-03-26 13:04:51 +100081to print debugging messages about their progress.
82This is helpful in
Damien Miller32aa1441999-10-29 09:15:49 +100083debugging connection, authentication, and configuration problems.
84.It Fl B
85Selects batch mode (prevents asking for passwords or passphrases).
86.It Fl q
87Disables the progress meter.
88.It Fl C
Damien Miller450a7a12000-03-26 13:04:51 +100089Compression enable.
90Passes the
Damien Miller32aa1441999-10-29 09:15:49 +100091.Fl C
92flag to
93.Xr ssh 1
94to enable compression.
95.It Fl P Ar port
Damien Miller450a7a12000-03-26 13:04:51 +100096Specifies the port to connect to on the remote host.
97Note that this option is written with a capital
Damien Miller32aa1441999-10-29 09:15:49 +100098.Sq P ,
99because
100.Fl p
101is already reserved for preserving the times and modes of the file in
102.Xr rcp 1 .
Damien Miller7b28dc52000-09-05 13:34:53 +1100103.It Fl S Ar program
104Name of
105.Ar program
Damien Miller874d77b2000-10-14 16:23:11 +1100106to use for the encrypted connection.
107The program must understand
Damien Millerad833b32000-08-23 10:46:23 +1000108.Xr ssh 1
109options.
Damien Miller874d77b2000-10-14 16:23:11 +1100110.It Fl o Ar option
111The given option is directly passed to
112.Xr ssh 1 .
Damien Miller34132e52000-01-14 15:45:46 +1100113.It Fl 4
114Forces
115.Nm
116to use IPv4 addresses only.
117.It Fl 6
118Forces
119.Nm
120to use IPv6 addresses only.
Damien Miller37023962000-07-11 17:31:38 +1000121.El
Damien Miller32aa1441999-10-29 09:15:49 +1000122.Sh AUTHORS
123Timo Rinne <tri@iki.fi> and Tatu Ylonen <ylo@cs.hut.fi>
124.Sh HISTORY
125.Nm
126is based on the
127.Xr rcp 1
128program in BSD source code from the Regents of the University of
129California.
130.Sh SEE ALSO
131.Xr rcp 1 ,
Damien Miller33804262001-02-04 23:20:18 +1100132.Xr sftp 1 ,
Damien Miller32aa1441999-10-29 09:15:49 +1000133.Xr ssh 1 ,
134.Xr ssh-add 1 ,
135.Xr ssh-agent 1 ,
136.Xr ssh-keygen 1 ,
137.Xr sshd 8