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

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