[BACK]Return to scp.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Annotation of src/usr.bin/ssh/scp.1, Revision 1.94

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.94    ! dtucker    11: .\" $OpenBSD: scp.1,v 1.93 2021/01/22 02:44:58 dtucker Exp $
1.1       deraadt    12: .\"
1.94    ! dtucker    13: .Dd $Mdocdate: January 22 2021 $
1.3       aaron      14: .Dt SCP 1
                     15: .Os
                     16: .Sh NAME
                     17: .Nm scp
1.87      jmc        18: .Nd OpenSSH secure file copy
1.3       aaron      19: .Sh SYNOPSIS
                     20: .Nm scp
1.90      djm        21: .Op Fl 346ABCpqrTv
1.29      jmc        22: .Op Fl c Ar cipher
1.19      stevesk    23: .Op Fl F Ar ssh_config
1.84      jmc        24: .Op Fl i Ar identity_file
1.83      tb         25: .Op Fl J Ar destination
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.76      jmc        30: .Ar source ... target
1.7       aaron      31: .Sh DESCRIPTION
1.3       aaron      32: .Nm
1.6       aaron      33: copies files between hosts on a network.
1.91      deraadt    34: .Pp
1.6       aaron      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
1.91      deraadt    38: same security as a login session.
                     39: The scp protocol requires execution of the remote user's shell to perform
                     40: .Xr glob 3
                     41: pattern matching.
                     42: .Pp
1.3       aaron      43: .Nm
1.1       deraadt    44: will ask for passwords or passphrases if they are needed for
                     45: authentication.
1.3       aaron      46: .Pp
1.75      millert    47: The
1.76      jmc        48: .Ar source
                     49: and
1.75      millert    50: .Ar target
                     51: may be specified as a local pathname, a remote host with optional path
                     52: in the form
1.76      jmc        53: .Sm off
                     54: .Oo user @ Oc host : Op path ,
                     55: .Sm on
                     56: or a URI in the form
                     57: .Sm off
                     58: .No scp:// Oo user @ Oc host Oo : port Oc Op / path .
                     59: .Sm on
1.44      jmc        60: Local file names can be made explicit using absolute or relative pathnames
                     61: to avoid
                     62: .Nm
                     63: treating file names containing
                     64: .Sq :\&
                     65: as host specifiers.
1.75      millert    66: .Pp
                     67: When copying between two remote hosts, if the URI format is used, a
                     68: .Ar port
                     69: may only be specified on the
                     70: .Ar target
                     71: if the
                     72: .Fl 3
                     73: option is used.
1.3       aaron      74: .Pp
                     75: The options are as follows:
                     76: .Bl -tag -width Ds
1.55      markus     77: .It Fl 3
                     78: Copies between two remote hosts are transferred through the local host.
                     79: Without this option the data is copied directly between the two remote
                     80: hosts.
1.88      markus     81: Note that this option disables the progress meter and selects batch mode
                     82: for the second host, since
1.89      jmc        83: .Nm
                     84: cannot ask for passwords or passphrases for both hosts.
1.29      jmc        85: .It Fl 4
                     86: Forces
                     87: .Nm
                     88: to use IPv4 addresses only.
                     89: .It Fl 6
                     90: Forces
1.3       aaron      91: .Nm
1.29      jmc        92: to use IPv6 addresses only.
1.90      djm        93: .It Fl A
                     94: Allows forwarding of
                     95: .Xr ssh-agent 1
                     96: to the remote system.
                     97: The default is not to forward an authentication agent.
1.3       aaron      98: .It Fl B
1.1       deraadt    99: Selects batch mode (prevents asking for passwords or passphrases).
1.3       aaron     100: .It Fl C
1.6       aaron     101: Compression enable.
                    102: Passes the
1.3       aaron     103: .Fl C
                    104: flag to
                    105: .Xr ssh 1
1.1       deraadt   106: to enable compression.
1.29      jmc       107: .It Fl c Ar cipher
                    108: Selects the cipher to use for encrypting the data transfer.
                    109: This option is directly passed to
                    110: .Xr ssh 1 .
1.19      stevesk   111: .It Fl F Ar ssh_config
                    112: Specifies an alternative
                    113: per-user configuration file for
                    114: .Nm ssh .
                    115: This option is directly passed to
                    116: .Xr ssh 1 .
1.29      jmc       117: .It Fl i Ar identity_file
1.46      djm       118: Selects the file from which the identity (private key) for public key
1.29      jmc       119: authentication is read.
1.82      tb        120: This option is directly passed to
                    121: .Xr ssh 1 .
                    122: .It Fl J Ar destination
1.84      jmc       123: Connect to the target host by first making an
1.82      tb        124: .Nm
                    125: connection to the jump host described by
                    126: .Ar destination
                    127: and then establishing a TCP forwarding to the ultimate destination from
                    128: there.
                    129: Multiple jump hops may be specified separated by comma characters.
                    130: This is a shortcut to specify a
                    131: .Cm ProxyJump
                    132: configuration directive.
1.29      jmc       133: This option is directly passed to
                    134: .Xr ssh 1 .
                    135: .It Fl l Ar limit
                    136: Limits the used bandwidth, specified in Kbit/s.
                    137: .It Fl o Ar ssh_option
                    138: Can be used to pass options to
                    139: .Nm ssh
                    140: in the format used in
                    141: .Xr ssh_config 5 .
                    142: This is useful for specifying options
                    143: for which there is no separate
                    144: .Nm scp
                    145: command-line flag.
                    146: For full details of the options listed below, and their possible values, see
                    147: .Xr ssh_config 5 .
                    148: .Pp
                    149: .Bl -tag -width Ds -offset indent -compact
                    150: .It AddressFamily
                    151: .It BatchMode
                    152: .It BindAddress
1.77      jmc       153: .It BindInterface
1.61      djm       154: .It CanonicalDomains
                    155: .It CanonicalizeFallbackLocal
                    156: .It CanonicalizeHostname
                    157: .It CanonicalizeMaxDots
                    158: .It CanonicalizePermittedCNAMEs
1.81      jmc       159: .It CASignatureAlgorithms
1.68      jmc       160: .It CertificateFile
1.29      jmc       161: .It ChallengeResponseAuthentication
                    162: .It CheckHostIP
                    163: .It Ciphers
                    164: .It Compression
1.74      naddy     165: .It ConnectionAttempts
1.34      dtucker   166: .It ConnectTimeout
1.36      djm       167: .It ControlMaster
                    168: .It ControlPath
1.57      djm       169: .It ControlPersist
1.29      jmc       170: .It GlobalKnownHostsFile
                    171: .It GSSAPIAuthentication
                    172: .It GSSAPIDelegateCredentials
1.38      jmc       173: .It HashKnownHosts
1.29      jmc       174: .It Host
                    175: .It HostbasedAuthentication
1.94    ! dtucker   176: .It HostbasedAcceptedAlgorithms
1.29      jmc       177: .It HostKeyAlgorithms
                    178: .It HostKeyAlias
1.86      jmc       179: .It Hostname
1.70      jmc       180: .It IdentitiesOnly
1.69      markus    181: .It IdentityAgent
1.29      jmc       182: .It IdentityFile
1.54      jmc       183: .It IPQoS
1.57      djm       184: .It KbdInteractiveAuthentication
1.37      djm       185: .It KbdInteractiveDevices
1.52      jmc       186: .It KexAlgorithms
1.92      jmc       187: .It KnownHostsCommand
1.29      jmc       188: .It LogLevel
                    189: .It MACs
                    190: .It NoHostAuthenticationForLocalhost
                    191: .It NumberOfPasswordPrompts
                    192: .It PasswordAuthentication
1.50      markus    193: .It PKCS11Provider
1.29      jmc       194: .It Port
                    195: .It PreferredAuthentications
                    196: .It ProxyCommand
1.71      jmc       197: .It ProxyJump
1.93      dtucker   198: .It PubkeyAcceptedAlgorithms
1.29      jmc       199: .It PubkeyAuthentication
1.39      dtucker   200: .It RekeyLimit
1.35      jmc       201: .It SendEnv
1.32      markus    202: .It ServerAliveInterval
                    203: .It ServerAliveCountMax
1.79      jmc       204: .It SetEnv
1.29      jmc       205: .It StrictHostKeyChecking
1.31      markus    206: .It TCPKeepAlive
1.65      jmc       207: .It UpdateHostKeys
1.29      jmc       208: .It User
                    209: .It UserKnownHostsFile
                    210: .It VerifyHostKeyDNS
                    211: .El
1.4       markus    212: .It Fl P Ar port
1.6       aaron     213: Specifies the port to connect to on the remote host.
                    214: Note that this option is written with a capital
1.3       aaron     215: .Sq P ,
                    216: because
                    217: .Fl p
1.62      tedu      218: is already reserved for preserving the times and modes of the file.
1.29      jmc       219: .It Fl p
                    220: Preserves modification times, access times, and modes from the
                    221: original file.
                    222: .It Fl q
1.43      djm       223: Quiet mode: disables the progress meter as well as warning and diagnostic
                    224: messages from
                    225: .Xr ssh 1 .
1.29      jmc       226: .It Fl r
                    227: Recursively copy entire directories.
1.45      dtucker   228: Note that
                    229: .Nm
                    230: follows symbolic links encountered in the tree traversal.
1.10      deraadt   231: .It Fl S Ar program
                    232: Name of
                    233: .Ar program
1.12      aaron     234: to use for the encrypted connection.
                    235: The program must understand
1.9       deraadt   236: .Xr ssh 1
                    237: options.
1.85      djm       238: .It Fl T
                    239: Disable strict filename checking.
                    240: By default when copying files from a remote host to a local directory
                    241: .Nm
                    242: checks that the received filenames match those requested on the command-line
                    243: to prevent the remote end from sending unexpected or unwanted files.
                    244: Because of differences in how various operating systems and shells interpret
                    245: filename wildcards, these checks may cause wanted files to be rejected.
                    246: This option disables these checks at the expense of fully trusting that
                    247: the server will not send unexpected filenames.
1.29      jmc       248: .It Fl v
                    249: Verbose mode.
                    250: Causes
1.24      markus    251: .Nm
1.29      jmc       252: and
                    253: .Xr ssh 1
                    254: to print debugging messages about their progress.
                    255: This is helpful in
                    256: debugging connection, authentication, and configuration problems.
1.8       aaron     257: .El
1.51      jmc       258: .Sh EXIT STATUS
1.40      jmc       259: .Ex -std scp
1.3       aaron     260: .Sh SEE ALSO
1.14      djm       261: .Xr sftp 1 ,
1.3       aaron     262: .Xr ssh 1 ,
                    263: .Xr ssh-add 1 ,
                    264: .Xr ssh-agent 1 ,
                    265: .Xr ssh-keygen 1 ,
1.23      stevesk   266: .Xr ssh_config 5 ,
1.3       aaron     267: .Xr sshd 8
1.28      jmc       268: .Sh HISTORY
                    269: .Nm
1.62      tedu      270: is based on the rcp program in
1.60      jmc       271: .Bx
                    272: source code from the Regents of the University of California.
1.28      jmc       273: .Sh AUTHORS
1.59      schwarze  274: .An Timo Rinne Aq Mt tri@iki.fi
                    275: .An Tatu Ylonen Aq Mt ylo@cs.hut.fi