Annotation of src/usr.bin/ssh/scp.1, Revision 1.76
1.1 deraadt 1: .\"
2: .\" scp.1
3: .\"
4: .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
5: .\"
6: .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7: .\" All rights reserved
8: .\"
9: .\" Created: Sun May 7 00:14:37 1995 ylo
10: .\"
1.76 ! jmc 11: .\" $OpenBSD: scp.1,v 1.75 2017/10/21 23:06:24 millert Exp $
1.1 deraadt 12: .\"
1.76 ! jmc 13: .Dd $Mdocdate: October 21 2017 $
1.3 aaron 14: .Dt SCP 1
15: .Os
16: .Sh NAME
17: .Nm scp
18: .Nd secure copy (remote file copy program)
19: .Sh SYNOPSIS
20: .Nm scp
1.72 djm 21: .Op Fl 346BCpqrv
1.29 jmc 22: .Op Fl c Ar cipher
1.19 stevesk 23: .Op Fl F Ar ssh_config
1.3 aaron 24: .Op Fl i Ar identity_file
1.25 markus 25: .Op Fl l Ar limit
1.17 stevesk 26: .Op Fl o Ar ssh_option
1.29 jmc 27: .Op Fl P Ar port
28: .Op Fl S Ar program
1.76 ! jmc 29: .Ar source ... target
1.7 aaron 30: .Sh DESCRIPTION
1.3 aaron 31: .Nm
1.6 aaron 32: copies files between hosts on a network.
33: It uses
1.3 aaron 34: .Xr ssh 1
1.1 deraadt 35: for data transfer, and uses the same authentication and provides the
36: same security as
1.3 aaron 37: .Xr ssh 1 .
38: .Nm
1.1 deraadt 39: will ask for passwords or passphrases if they are needed for
40: authentication.
1.3 aaron 41: .Pp
1.75 millert 42: The
1.76 ! jmc 43: .Ar source
! 44: and
1.75 millert 45: .Ar target
46: may be specified as a local pathname, a remote host with optional path
47: in the form
1.76 ! jmc 48: .Sm off
! 49: .Oo user @ Oc host : Op path ,
! 50: .Sm on
! 51: or a URI in the form
! 52: .Sm off
! 53: .No scp:// Oo user @ Oc host Oo : port Oc Op / path .
! 54: .Sm on
1.44 jmc 55: Local file names can be made explicit using absolute or relative pathnames
56: to avoid
57: .Nm
58: treating file names containing
59: .Sq :\&
60: as host specifiers.
1.75 millert 61: .Pp
62: When copying between two remote hosts, if the URI format is used, a
63: .Ar port
64: may only be specified on the
65: .Ar target
66: if the
67: .Fl 3
68: option is used.
1.3 aaron 69: .Pp
70: The options are as follows:
71: .Bl -tag -width Ds
1.55 markus 72: .It Fl 3
73: Copies between two remote hosts are transferred through the local host.
74: Without this option the data is copied directly between the two remote
75: hosts.
1.56 jmc 76: Note that this option disables the progress meter.
1.29 jmc 77: .It Fl 4
78: Forces
79: .Nm
80: to use IPv4 addresses only.
81: .It Fl 6
82: Forces
1.3 aaron 83: .Nm
1.29 jmc 84: to use IPv6 addresses only.
1.3 aaron 85: .It Fl B
1.1 deraadt 86: Selects batch mode (prevents asking for passwords or passphrases).
1.3 aaron 87: .It Fl C
1.6 aaron 88: Compression enable.
89: Passes the
1.3 aaron 90: .Fl C
91: flag to
92: .Xr ssh 1
1.1 deraadt 93: to enable compression.
1.29 jmc 94: .It Fl c Ar cipher
95: Selects the cipher to use for encrypting the data transfer.
96: This option is directly passed to
97: .Xr ssh 1 .
1.19 stevesk 98: .It Fl F Ar ssh_config
99: Specifies an alternative
100: per-user configuration file for
101: .Nm ssh .
102: This option is directly passed to
103: .Xr ssh 1 .
1.29 jmc 104: .It Fl i Ar identity_file
1.46 djm 105: Selects the file from which the identity (private key) for public key
1.29 jmc 106: authentication is read.
107: This option is directly passed to
108: .Xr ssh 1 .
109: .It Fl l Ar limit
110: Limits the used bandwidth, specified in Kbit/s.
111: .It Fl o Ar ssh_option
112: Can be used to pass options to
113: .Nm ssh
114: in the format used in
115: .Xr ssh_config 5 .
116: This is useful for specifying options
117: for which there is no separate
118: .Nm scp
119: command-line flag.
120: For full details of the options listed below, and their possible values, see
121: .Xr ssh_config 5 .
122: .Pp
123: .Bl -tag -width Ds -offset indent -compact
124: .It AddressFamily
125: .It BatchMode
126: .It BindAddress
1.61 djm 127: .It CanonicalDomains
128: .It CanonicalizeFallbackLocal
129: .It CanonicalizeHostname
130: .It CanonicalizeMaxDots
131: .It CanonicalizePermittedCNAMEs
1.68 jmc 132: .It CertificateFile
1.29 jmc 133: .It ChallengeResponseAuthentication
134: .It CheckHostIP
135: .It Ciphers
136: .It Compression
1.74 naddy 137: .It ConnectionAttempts
1.34 dtucker 138: .It ConnectTimeout
1.36 djm 139: .It ControlMaster
140: .It ControlPath
1.57 djm 141: .It ControlPersist
1.29 jmc 142: .It GlobalKnownHostsFile
143: .It GSSAPIAuthentication
144: .It GSSAPIDelegateCredentials
1.38 jmc 145: .It HashKnownHosts
1.29 jmc 146: .It Host
147: .It HostbasedAuthentication
1.66 djm 148: .It HostbasedKeyTypes
1.29 jmc 149: .It HostKeyAlgorithms
150: .It HostKeyAlias
151: .It HostName
1.70 jmc 152: .It IdentitiesOnly
1.69 markus 153: .It IdentityAgent
1.29 jmc 154: .It IdentityFile
1.54 jmc 155: .It IPQoS
1.57 djm 156: .It KbdInteractiveAuthentication
1.37 djm 157: .It KbdInteractiveDevices
1.52 jmc 158: .It KexAlgorithms
1.29 jmc 159: .It LogLevel
160: .It MACs
161: .It NoHostAuthenticationForLocalhost
162: .It NumberOfPasswordPrompts
163: .It PasswordAuthentication
1.50 markus 164: .It PKCS11Provider
1.29 jmc 165: .It Port
166: .It PreferredAuthentications
167: .It ProxyCommand
1.71 jmc 168: .It ProxyJump
1.67 markus 169: .It PubkeyAcceptedKeyTypes
1.29 jmc 170: .It PubkeyAuthentication
1.39 dtucker 171: .It RekeyLimit
1.35 jmc 172: .It SendEnv
1.32 markus 173: .It ServerAliveInterval
174: .It ServerAliveCountMax
1.29 jmc 175: .It StrictHostKeyChecking
1.31 markus 176: .It TCPKeepAlive
1.65 jmc 177: .It UpdateHostKeys
1.29 jmc 178: .It UsePrivilegedPort
179: .It User
180: .It UserKnownHostsFile
181: .It VerifyHostKeyDNS
182: .El
1.4 markus 183: .It Fl P Ar port
1.6 aaron 184: Specifies the port to connect to on the remote host.
185: Note that this option is written with a capital
1.3 aaron 186: .Sq P ,
187: because
188: .Fl p
1.62 tedu 189: is already reserved for preserving the times and modes of the file.
1.29 jmc 190: .It Fl p
191: Preserves modification times, access times, and modes from the
192: original file.
193: .It Fl q
1.43 djm 194: Quiet mode: disables the progress meter as well as warning and diagnostic
195: messages from
196: .Xr ssh 1 .
1.29 jmc 197: .It Fl r
198: Recursively copy entire directories.
1.45 dtucker 199: Note that
200: .Nm
201: follows symbolic links encountered in the tree traversal.
1.10 deraadt 202: .It Fl S Ar program
203: Name of
204: .Ar program
1.12 aaron 205: to use for the encrypted connection.
206: The program must understand
1.9 deraadt 207: .Xr ssh 1
208: options.
1.29 jmc 209: .It Fl v
210: Verbose mode.
211: Causes
1.24 markus 212: .Nm
1.29 jmc 213: and
214: .Xr ssh 1
215: to print debugging messages about their progress.
216: This is helpful in
217: debugging connection, authentication, and configuration problems.
1.8 aaron 218: .El
1.51 jmc 219: .Sh EXIT STATUS
1.40 jmc 220: .Ex -std scp
1.3 aaron 221: .Sh SEE ALSO
1.14 djm 222: .Xr sftp 1 ,
1.3 aaron 223: .Xr ssh 1 ,
224: .Xr ssh-add 1 ,
225: .Xr ssh-agent 1 ,
226: .Xr ssh-keygen 1 ,
1.23 stevesk 227: .Xr ssh_config 5 ,
1.3 aaron 228: .Xr sshd 8
1.28 jmc 229: .Sh HISTORY
230: .Nm
1.62 tedu 231: is based on the rcp program in
1.60 jmc 232: .Bx
233: source code from the Regents of the University of California.
1.28 jmc 234: .Sh AUTHORS
1.59 schwarze 235: .An Timo Rinne Aq Mt tri@iki.fi
236: .An Tatu Ylonen Aq Mt ylo@cs.hut.fi