Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 1 | SCP(1) General Commands Manual SCP(1) |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 2 | |
| 3 | NAME |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 4 | scp M-bM-^@M-^S secure copy (remote file copy program) |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 5 | |
| 6 | SYNOPSIS |
| 7 | scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] |
| 8 | [-l limit] [-o ssh_option] [-P port] [-S program] |
| 9 | [[user@]host1:]file1 ... [[user@]host2:]file2 |
| 10 | |
| 11 | DESCRIPTION |
| 12 | scp copies files between hosts on a network. It uses ssh(1) for data |
| 13 | transfer, and uses the same authentication and provides the same security |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 14 | as ssh(1). scp will ask for passwords or passphrases if they are needed |
| 15 | for authentication. |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 16 | |
| 17 | File names may contain a user and host specification to indicate that the |
| 18 | file is to be copied to/from that host. Local file names can be made |
| 19 | explicit using absolute or relative pathnames to avoid scp treating file |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 20 | names containing M-bM-^@M-^X:M-bM-^@M-^Y as host specifiers. Copies between two remote hosts |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 21 | are also permitted. |
| 22 | |
| 23 | The options are as follows: |
| 24 | |
| 25 | -1 Forces scp to use protocol 1. |
| 26 | |
| 27 | -2 Forces scp to use protocol 2. |
| 28 | |
| 29 | -3 Copies between two remote hosts are transferred through the local |
| 30 | host. Without this option the data is copied directly between |
| 31 | the two remote hosts. Note that this option disables the |
| 32 | progress meter. |
| 33 | |
| 34 | -4 Forces scp to use IPv4 addresses only. |
| 35 | |
| 36 | -6 Forces scp to use IPv6 addresses only. |
| 37 | |
| 38 | -B Selects batch mode (prevents asking for passwords or |
| 39 | passphrases). |
| 40 | |
| 41 | -C Compression enable. Passes the -C flag to ssh(1) to enable |
| 42 | compression. |
| 43 | |
| 44 | -c cipher |
| 45 | Selects the cipher to use for encrypting the data transfer. This |
| 46 | option is directly passed to ssh(1). |
| 47 | |
| 48 | -F ssh_config |
| 49 | Specifies an alternative per-user configuration file for ssh. |
| 50 | This option is directly passed to ssh(1). |
| 51 | |
| 52 | -i identity_file |
| 53 | Selects the file from which the identity (private key) for public |
| 54 | key authentication is read. This option is directly passed to |
| 55 | ssh(1). |
| 56 | |
| 57 | -l limit |
| 58 | Limits the used bandwidth, specified in Kbit/s. |
| 59 | |
| 60 | -o ssh_option |
| 61 | Can be used to pass options to ssh in the format used in |
| 62 | ssh_config(5). This is useful for specifying options for which |
| 63 | there is no separate scp command-line flag. For full details of |
| 64 | the options listed below, and their possible values, see |
| 65 | ssh_config(5). |
| 66 | |
| 67 | AddressFamily |
| 68 | BatchMode |
| 69 | BindAddress |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 70 | CanonicalDomains |
| 71 | CanonicalizeFallbackLocal |
| 72 | CanonicalizeHostname |
| 73 | CanonicalizeMaxDots |
| 74 | CanonicalizePermittedCNAMEs |
Greg Hartman | 9768ca4 | 2017-06-22 20:49:52 -0700 | [diff] [blame] | 75 | CertificateFile |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 76 | ChallengeResponseAuthentication |
| 77 | CheckHostIP |
| 78 | Cipher |
| 79 | Ciphers |
| 80 | Compression |
| 81 | CompressionLevel |
| 82 | ConnectionAttempts |
| 83 | ConnectTimeout |
| 84 | ControlMaster |
| 85 | ControlPath |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 86 | ControlPersist |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 87 | GlobalKnownHostsFile |
| 88 | GSSAPIAuthentication |
| 89 | GSSAPIDelegateCredentials |
| 90 | HashKnownHosts |
| 91 | Host |
| 92 | HostbasedAuthentication |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 93 | HostbasedKeyTypes |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 94 | HostKeyAlgorithms |
| 95 | HostKeyAlias |
| 96 | HostName |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 97 | IdentitiesOnly |
Greg Hartman | 9768ca4 | 2017-06-22 20:49:52 -0700 | [diff] [blame] | 98 | IdentityAgent |
| 99 | IdentityFile |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 100 | IPQoS |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 101 | KbdInteractiveAuthentication |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 102 | KbdInteractiveDevices |
| 103 | KexAlgorithms |
| 104 | LogLevel |
| 105 | MACs |
| 106 | NoHostAuthenticationForLocalhost |
| 107 | NumberOfPasswordPrompts |
| 108 | PasswordAuthentication |
| 109 | PKCS11Provider |
| 110 | Port |
| 111 | PreferredAuthentications |
| 112 | Protocol |
| 113 | ProxyCommand |
Greg Hartman | 9768ca4 | 2017-06-22 20:49:52 -0700 | [diff] [blame] | 114 | ProxyJump |
Greg Hartman | ccacbc9 | 2016-02-03 09:59:44 -0800 | [diff] [blame] | 115 | PubkeyAcceptedKeyTypes |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 116 | PubkeyAuthentication |
| 117 | RekeyLimit |
| 118 | RhostsRSAAuthentication |
| 119 | RSAAuthentication |
| 120 | SendEnv |
| 121 | ServerAliveInterval |
| 122 | ServerAliveCountMax |
| 123 | StrictHostKeyChecking |
| 124 | TCPKeepAlive |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 125 | UpdateHostKeys |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 126 | UsePrivilegedPort |
| 127 | User |
| 128 | UserKnownHostsFile |
| 129 | VerifyHostKeyDNS |
| 130 | |
| 131 | -P port |
| 132 | Specifies the port to connect to on the remote host. Note that |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 133 | this option is written with a capital M-bM-^@M-^XPM-bM-^@M-^Y, because -p is already |
| 134 | reserved for preserving the times and modes of the file. |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 135 | |
| 136 | -p Preserves modification times, access times, and modes from the |
| 137 | original file. |
| 138 | |
| 139 | -q Quiet mode: disables the progress meter as well as warning and |
| 140 | diagnostic messages from ssh(1). |
| 141 | |
| 142 | -r Recursively copy entire directories. Note that scp follows |
| 143 | symbolic links encountered in the tree traversal. |
| 144 | |
| 145 | -S program |
| 146 | Name of program to use for the encrypted connection. The program |
| 147 | must understand ssh(1) options. |
| 148 | |
| 149 | -v Verbose mode. Causes scp and ssh(1) to print debugging messages |
| 150 | about their progress. This is helpful in debugging connection, |
| 151 | authentication, and configuration problems. |
| 152 | |
| 153 | EXIT STATUS |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 154 | The scp utility exitsM-BM- 0 on success, andM-BM- >0 if an error occurs. |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 155 | |
| 156 | SEE ALSO |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 157 | sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5), |
| 158 | sshd(8) |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 159 | |
| 160 | HISTORY |
Adam Langley | d059297 | 2015-03-30 14:49:51 -0700 | [diff] [blame] | 161 | scp is based on the rcp program in BSD source code from the Regents of |
Greg Hartman | bd77cf7 | 2015-02-25 13:21:06 -0800 | [diff] [blame] | 162 | the University of California. |
| 163 | |
| 164 | AUTHORS |
| 165 | Timo Rinne <tri@iki.fi> |
| 166 | Tatu Ylonen <ylo@cs.hut.fi> |
| 167 | |
Greg Hartman | 9768ca4 | 2017-06-22 20:49:52 -0700 | [diff] [blame] | 168 | OpenBSD 6.0 July 16, 2016 OpenBSD 6.0 |