blob: 0c29c9fe85d638d7d3299040d1abe9e337ceff72 [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 Millerb508faa2008-02-10 22:28:45 +110012.\" $OpenBSD: scp.1,v 1.44 2008/01/31 20:06:50 jmc Exp $
Damien Millerc7ce0da2008-06-16 07:55:06 +100013.\" $OpenBSD: scp.1,v 1.45 2008/06/14 19:42:10 dtucker Exp $
Damien Miller32aa1441999-10-29 09:15:49 +100014.\"
Damien Millerc7ce0da2008-06-16 07:55:06 +100015.Dd $Mdocdate: June 14 2008 $
Damien Miller32aa1441999-10-29 09:15:49 +100016.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
Damien Miller495dca32003-04-01 21:42:14 +100023.Bk -words
Darren Tucker1f203942003-10-15 15:50:42 +100024.Op Fl 1246BCpqrv
Damien Miller32aa1441999-10-29 09:15:49 +100025.Op Fl c Ar cipher
Darren Tucker1f203942003-10-15 15:50:42 +100026.Op Fl F Ar ssh_config
Damien Miller32aa1441999-10-29 09:15:49 +100027.Op Fl i Ar identity_file
Damien Miller8ee66a22003-02-24 11:50:50 +110028.Op Fl l Ar limit
Ben Lindstrom14c62eb2001-08-15 23:25:46 +000029.Op Fl o Ar ssh_option
Darren Tucker1f203942003-10-15 15:50:42 +100030.Op Fl P Ar port
31.Op Fl S Ar program
Damien Miller32aa1441999-10-29 09:15:49 +100032.Sm off
33.Oo
Darren Tucker1f203942003-10-15 15:50:42 +100034.Op Ar user No @
Damien Miller32aa1441999-10-29 09:15:49 +100035.Ar host1 No :
36.Oc Ns Ar file1
37.Sm on
Damien Miller647d97b2007-08-08 14:29:58 +100038.Ar ...
Damien Miller32aa1441999-10-29 09:15:49 +100039.Sm off
40.Oo
Darren Tucker1f203942003-10-15 15:50:42 +100041.Op Ar user No @
Damien Miller32aa1441999-10-29 09:15:49 +100042.Ar host2 No :
43.Oc Ar file2
44.Sm on
Damien Miller495dca32003-04-01 21:42:14 +100045.Ek
Damien Miller22c77262000-04-13 12:26:34 +100046.Sh DESCRIPTION
Damien Miller32aa1441999-10-29 09:15:49 +100047.Nm
Damien Miller450a7a12000-03-26 13:04:51 +100048copies files between hosts on a network.
49It uses
Damien Miller32aa1441999-10-29 09:15:49 +100050.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
Damien Millerb508faa2008-02-10 22:28:45 +110060File names may contain a user and host specification to indicate
Damien Miller450a7a12000-03-26 13:04:51 +100061that the file is to be copied to/from that host.
Damien Millerb508faa2008-02-10 22:28:45 +110062Local 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.
Damien Miller32aa1441999-10-29 09:15:49 +100069.Pp
70The options are as follows:
71.Bl -tag -width Ds
Damien Miller8e121472003-01-24 11:37:38 +110072.It Fl 1
73Forces
74.Nm
75to use protocol 1.
76.It Fl 2
77Forces
78.Nm
79to use protocol 2.
Damien Miller34132e52000-01-14 15:45:46 +110080.It Fl 4
81Forces
82.Nm
83to use IPv4 addresses only.
84.It Fl 6
85Forces
86.Nm
87to use IPv6 addresses only.
Darren Tucker1f203942003-10-15 15:50:42 +100088.It Fl B
89Selects batch mode (prevents asking for passwords or passphrases).
90.It Fl C
91Compression enable.
92Passes the
93.Fl C
94flag to
95.Xr ssh 1
96to enable compression.
97.It Fl c Ar cipher
98Selects the cipher to use for encrypting the data transfer.
99This option is directly passed to
100.Xr ssh 1 .
101.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 .
107.It Fl i Ar identity_file
108Selects the file from which the identity (private key) for RSA
109authentication is read.
110This option is directly passed to
111.Xr ssh 1 .
112.It Fl l Ar limit
113Limits the used bandwidth, specified in Kbit/s.
114.It Fl o Ar ssh_option
115Can be used to pass options to
116.Nm ssh
117in the format used in
118.Xr ssh_config 5 .
119This is useful for specifying options
120for which there is no separate
121.Nm scp
122command-line flag.
123For full details of the options listed below, and their possible values, see
124.Xr ssh_config 5 .
125.Pp
126.Bl -tag -width Ds -offset indent -compact
127.It AddressFamily
128.It BatchMode
129.It BindAddress
130.It ChallengeResponseAuthentication
131.It CheckHostIP
132.It Cipher
133.It Ciphers
Darren Tucker1f203942003-10-15 15:50:42 +1000134.It Compression
135.It CompressionLevel
136.It ConnectionAttempts
Darren Tuckerc0796d72004-05-03 09:19:03 +1000137.It ConnectTimeout
Damien Miller0e220db2004-06-15 10:34:08 +1000138.It ControlMaster
139.It ControlPath
Darren Tucker1f203942003-10-15 15:50:42 +1000140.It GlobalKnownHostsFile
141.It GSSAPIAuthentication
142.It GSSAPIDelegateCredentials
Damien Miller27e9c512005-03-02 12:04:16 +1100143.It HashKnownHosts
Darren Tucker1f203942003-10-15 15:50:42 +1000144.It Host
145.It HostbasedAuthentication
146.It HostKeyAlgorithms
147.It HostKeyAlias
148.It HostName
149.It IdentityFile
Damien Millerbd394c32004-03-08 23:12:36 +1100150.It IdentitiesOnly
Darren Tucker636ca902004-11-05 20:22:00 +1100151.It KbdInteractiveDevices
Darren Tucker1f203942003-10-15 15:50:42 +1000152.It LogLevel
153.It MACs
154.It NoHostAuthenticationForLocalhost
155.It NumberOfPasswordPrompts
156.It PasswordAuthentication
157.It Port
158.It PreferredAuthentications
159.It Protocol
160.It ProxyCommand
161.It PubkeyAuthentication
Darren Tucker62388b22006-01-20 11:31:47 +1100162.It RekeyLimit
Darren Tucker1f203942003-10-15 15:50:42 +1000163.It RhostsRSAAuthentication
164.It RSAAuthentication
Darren Tucker2e578f62004-05-13 13:03:04 +1000165.It SendEnv
Damien Miller509b0102003-12-17 16:33:10 +1100166.It ServerAliveInterval
167.It ServerAliveCountMax
Darren Tucker1f203942003-10-15 15:50:42 +1000168.It SmartcardDevice
169.It StrictHostKeyChecking
Damien Miller12c150e2003-12-17 16:31:10 +1100170.It TCPKeepAlive
Darren Tucker1f203942003-10-15 15:50:42 +1000171.It UsePrivilegedPort
172.It User
173.It UserKnownHostsFile
174.It VerifyHostKeyDNS
Darren Tucker1f203942003-10-15 15:50:42 +1000175.El
176.It Fl P Ar port
177Specifies the port to connect to on the remote host.
178Note that this option is written with a capital
179.Sq P ,
180because
181.Fl p
182is already reserved for preserving the times and modes of the file in
183.Xr rcp 1 .
184.It Fl p
185Preserves modification times, access times, and modes from the
186original file.
187.It Fl q
Damien Miller4cd24c72008-02-10 22:22:29 +1100188Quiet mode: disables the progress meter as well as warning and diagnostic
189messages from
190.Xr ssh 1 .
Darren Tucker1f203942003-10-15 15:50:42 +1000191.It Fl r
192Recursively copy entire directories.
Damien Millerc7ce0da2008-06-16 07:55:06 +1000193Note that
194.Nm
195follows symbolic links encountered in the tree traversal.
Darren Tucker1f203942003-10-15 15:50:42 +1000196.It Fl S Ar program
197Name of
198.Ar program
199to use for the encrypted connection.
200The program must understand
201.Xr ssh 1
202options.
203.It Fl v
204Verbose mode.
205Causes
206.Nm
207and
208.Xr ssh 1
209to print debugging messages about their progress.
210This is helpful in
211debugging connection, authentication, and configuration problems.
Damien Miller37023962000-07-11 17:31:38 +1000212.El
Damien Miller22d47ab2006-07-24 14:04:36 +1000213.Pp
214.Ex -std scp
Damien Miller32aa1441999-10-29 09:15:49 +1000215.Sh SEE ALSO
216.Xr rcp 1 ,
Damien Miller33804262001-02-04 23:20:18 +1100217.Xr sftp 1 ,
Damien Miller32aa1441999-10-29 09:15:49 +1000218.Xr ssh 1 ,
219.Xr ssh-add 1 ,
220.Xr ssh-agent 1 ,
221.Xr ssh-keygen 1 ,
Ben Lindstromc06bf702002-06-23 00:34:37 +0000222.Xr ssh_config 5 ,
Damien Miller32aa1441999-10-29 09:15:49 +1000223.Xr sshd 8
Damien Millerf1ce5052003-06-11 22:04:39 +1000224.Sh HISTORY
225.Nm
226is based on the
227.Xr rcp 1
228program in BSD source code from the Regents of the University of
229California.
230.Sh AUTHORS
231.An Timo Rinne Aq tri@iki.fi
Damien Millerf1ce5052003-06-11 22:04:39 +1000232.An Tatu Ylonen Aq ylo@cs.hut.fi