Annotation of src/usr.bin/ssh/scp.1, Revision 1.25
1.1 deraadt 1: .\" -*- 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: .\"
1.25 ! markus 12: .\" $OpenBSD: scp.1,v 1.24 2003/01/23 14:06:15 markus Exp $
1.1 deraadt 13: .\"
1.3 aaron 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
1.24 markus 22: .Op Fl pqrvBC1246
1.19 stevesk 23: .Op Fl F Ar ssh_config
1.10 deraadt 24: .Op Fl S Ar program
1.3 aaron 25: .Op Fl P Ar port
26: .Op Fl c Ar cipher
27: .Op Fl i Ar identity_file
1.25 ! markus 28: .Op Fl l Ar limit
1.17 stevesk 29: .Op Fl o Ar ssh_option
1.3 aaron 30: .Sm off
31: .Oo
32: .Op Ar user@
33: .Ar host1 No :
34: .Oc Ns Ar file1
35: .Sm on
36: .Op Ar ...
37: .Sm off
38: .Oo
39: .Op Ar user@
40: .Ar host2 No :
41: .Oc Ar file2
42: .Sm on
1.7 aaron 43: .Sh DESCRIPTION
1.3 aaron 44: .Nm
1.6 aaron 45: copies files between hosts on a network.
46: It uses
1.3 aaron 47: .Xr ssh 1
1.1 deraadt 48: for data transfer, and uses the same authentication and provides the
49: same security as
1.3 aaron 50: .Xr ssh 1 .
1.1 deraadt 51: Unlike
1.3 aaron 52: .Xr rcp 1 ,
53: .Nm
1.1 deraadt 54: will ask for passwords or passphrases if they are needed for
55: authentication.
1.3 aaron 56: .Pp
1.1 deraadt 57: Any file name may contain a host and user specification to indicate
1.6 aaron 58: that the file is to be copied to/from that host.
59: Copies between two remote hosts are permitted.
1.3 aaron 60: .Pp
61: The options are as follows:
62: .Bl -tag -width Ds
63: .It Fl c Ar cipher
1.6 aaron 64: Selects the cipher to use for encrypting the data transfer.
65: This option is directly passed to
1.3 aaron 66: .Xr ssh 1 .
67: .It Fl i Ar identity_file
1.1 deraadt 68: Selects the file from which the identity (private key) for RSA
1.6 aaron 69: authentication is read.
70: This option is directly passed to
1.3 aaron 71: .Xr ssh 1 .
1.25 ! markus 72: .It Fl l Ar limit
! 73: Limits the used bandwidth, specified in Kbit/s.
1.3 aaron 74: .It Fl p
1.1 deraadt 75: Preserves modification times, access times, and modes from the
76: original file.
1.3 aaron 77: .It Fl r
1.1 deraadt 78: Recursively copy entire directories.
1.3 aaron 79: .It Fl v
1.6 aaron 80: Verbose mode.
81: Causes
1.3 aaron 82: .Nm
1.7 aaron 83: and
1.3 aaron 84: .Xr ssh 1
1.6 aaron 85: to print debugging messages about their progress.
86: This is helpful in
1.1 deraadt 87: debugging connection, authentication, and configuration problems.
1.3 aaron 88: .It Fl B
1.1 deraadt 89: Selects batch mode (prevents asking for passwords or passphrases).
1.3 aaron 90: .It Fl q
1.2 aaron 91: Disables the progress meter.
1.3 aaron 92: .It Fl C
1.6 aaron 93: Compression enable.
94: Passes the
1.3 aaron 95: .Fl C
96: flag to
97: .Xr ssh 1
1.1 deraadt 98: to enable compression.
1.19 stevesk 99: .It Fl F Ar ssh_config
100: Specifies an alternative
101: per-user configuration file for
102: .Nm ssh .
103: This option is directly passed to
104: .Xr ssh 1 .
1.4 markus 105: .It Fl P Ar port
1.6 aaron 106: Specifies the port to connect to on the remote host.
107: Note that this option is written with a capital
1.3 aaron 108: .Sq P ,
109: because
110: .Fl p
111: is already reserved for preserving the times and modes of the file in
112: .Xr rcp 1 .
1.10 deraadt 113: .It Fl S Ar program
114: Name of
115: .Ar program
1.12 aaron 116: to use for the encrypted connection.
117: The program must understand
1.9 deraadt 118: .Xr ssh 1
119: options.
1.17 stevesk 120: .It Fl o Ar ssh_option
121: Can be used to pass options to
122: .Nm ssh
1.22 stevesk 123: in the format used in
124: .Xr ssh_config 5 .
125: This is useful for specifying options
1.17 stevesk 126: for which there is no separate
127: .Nm scp
1.18 deraadt 128: command-line flag. For example, forcing the use of protocol
1.24 markus 129: version 1 can be specified using
1.17 stevesk 130: .Ic scp -oProtocol=1 .
1.24 markus 131: .It Fl 1
132: Forces
133: .Nm
134: to use protocol 1.
135: .It Fl 2
136: Forces
137: .Nm
138: to use protocol 2.
1.5 markus 139: .It Fl 4
140: Forces
141: .Nm
142: to use IPv4 addresses only.
143: .It Fl 6
144: Forces
145: .Nm
146: to use IPv6 addresses only.
1.8 aaron 147: .El
1.21 markus 148: .Sh DIAGNOSTICS
149: .Nm
150: exits with 0 on success or >0 if an error occurred.
1.3 aaron 151: .Sh AUTHORS
1.1 deraadt 152: Timo Rinne <tri@iki.fi> and Tatu Ylonen <ylo@cs.hut.fi>
1.3 aaron 153: .Sh HISTORY
154: .Nm
1.1 deraadt 155: is based on the
1.3 aaron 156: .Xr rcp 1
1.1 deraadt 157: program in BSD source code from the Regents of the University of
158: California.
1.3 aaron 159: .Sh SEE ALSO
160: .Xr rcp 1 ,
1.14 djm 161: .Xr sftp 1 ,
1.3 aaron 162: .Xr ssh 1 ,
163: .Xr ssh-add 1 ,
164: .Xr ssh-agent 1 ,
165: .Xr ssh-keygen 1 ,
1.23 stevesk 166: .Xr ssh_config 5 ,
1.3 aaron 167: .Xr sshd 8