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