[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.97

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