1.\" $NetBSD: scp.1,v 1.3 2010/11/21 18:29:49 adam Exp $ 2.\" -*- nroff -*- 3.\" 4.\" scp.1 5.\" 6.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 7.\" 8.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 9.\" All rights reserved 10.\" 11.\" Created: Sun May 7 00:14:37 1995 ylo 12.\" 13.\" $OpenBSD: scp.1,v 1.50 2010/02/08 10:50:20 markus Exp $ 14.\" 15.Dd February 8, 2010 16.Dt SCP 1 17.Os 18.Sh NAME 19.Nm scp 20.Nd secure copy (remote file copy program) 21.Sh SYNOPSIS 22.Nm scp 23.Bk -words 24.Op Fl 1246BCpqrv 25.Op Fl c Ar cipher 26.Op Fl F Ar ssh_config 27.Op Fl i Ar identity_file 28.Op Fl l Ar limit 29.Op Fl o Ar ssh_option 30.Op Fl P Ar port 31.Op Fl S Ar program 32.Sm off 33.Oo 34.Op Ar user No @ 35.Ar host1 No : 36.Oc Ns Ar file1 37.Sm on 38.Ar ... 39.Sm off 40.Oo 41.Op Ar user No @ 42.Ar host2 No : 43.Oc Ar file2 44.Sm on 45.Ek 46.Sh DESCRIPTION 47.Nm 48copies files between hosts on a network. 49It uses 50.Xr ssh 1 51for data transfer, and uses the same authentication and provides the 52same security as 53.Xr ssh 1 . 54Unlike 55.Xr rcp 1 , 56.Nm 57will ask for passwords or passphrases if they are needed for 58authentication. 59.Pp 60File names may contain a user and host specification to indicate 61that the file is to be copied to/from that host. 62Local file names can be made explicit using absolute or relative pathnames 63to avoid 64.Nm 65treating file names containing 66.Sq :\& 67as host specifiers. 68Copies between two remote hosts are also permitted. 69.Pp 70The options are as follows: 71.Bl -tag -width Ds 72.It Fl 1 73Forces 74.Nm 75to use protocol 1. 76.It Fl 2 77Forces 78.Nm 79to use protocol 2. 80.It Fl 4 81Forces 82.Nm 83to use IPv4 addresses only. 84.It Fl 6 85Forces 86.Nm 87to use IPv6 addresses only. 88.It Fl B 89Selects batch mode (prevents asking for passwords or passphrases). 90.It Fl C 91Compression enable. 92Passes the 93.Fl C 94flag to 95.Xr ssh 1 96to enable compression. 97.It Fl c Ar cipher 98Selects the cipher to use for encrypting the data transfer. 99This option is directly passed to 100.Xr ssh 1 . 101.It Fl F Ar ssh_config 102Specifies an alternative 103per-user configuration file for 104.Nm ssh . 105This option is directly passed to 106.Xr ssh 1 . 107.It Fl i Ar identity_file 108Selects the file from which the identity (private key) for public key 109authentication is read. 110This option is directly passed to 111.Xr ssh 1 . 112.It Fl l Ar limit 113Limits the used bandwidth, specified in Kbit/s. 114.It Fl o Ar ssh_option 115Can be used to pass options to 116.Nm ssh 117in the format used in 118.Xr ssh_config 5 . 119This is useful for specifying options 120for which there is no separate 121.Nm scp 122command-line flag. 123For full details of the options listed below, and their possible values, see 124.Xr ssh_config 5 . 125.Pp 126.Bl -tag -width Ds -offset indent -compact 127.It AddressFamily 128.It BatchMode 129.It BindAddress 130.It ChallengeResponseAuthentication 131.It CheckHostIP 132.It Cipher 133.It Ciphers 134.It Compression 135.It CompressionLevel 136.It ConnectionAttempts 137.It ConnectTimeout 138.It ControlMaster 139.It ControlPath 140.It GlobalKnownHostsFile 141.It GSSAPIAuthentication 142.It GSSAPIDelegateCredentials 143.It HashKnownHosts 144.It Host 145.It HostbasedAuthentication 146.It HostKeyAlgorithms 147.It HostKeyAlias 148.It HostName 149.It IdentityFile 150.It IdentitiesOnly 151.It KbdInteractiveDevices 152.It LogLevel 153.It MACs 154.It NoHostAuthenticationForLocalhost 155.It NumberOfPasswordPrompts 156.It PasswordAuthentication 157.It PKCS11Provider 158.It Port 159.It PreferredAuthentications 160.It Protocol 161.It ProxyCommand 162.It PubkeyAuthentication 163.It RekeyLimit 164.It RhostsRSAAuthentication 165.It RSAAuthentication 166.It SendEnv 167.It ServerAliveInterval 168.It ServerAliveCountMax 169.It StrictHostKeyChecking 170.It TCPKeepAlive 171.It UsePrivilegedPort 172.It User 173.It UserKnownHostsFile 174.It VerifyHostKeyDNS 175.El 176.It Fl P Ar port 177Specifies the port to connect to on the remote host. 178Note that this option is written with a capital 179.Sq P , 180because 181.Fl p 182is already reserved for preserving the times and modes of the file in 183.Xr rcp 1 . 184.It Fl p 185Preserves modification times, access times, and modes from the 186original file. 187.It Fl q 188Quiet mode: disables the progress meter as well as warning and diagnostic 189messages from 190.Xr ssh 1 . 191.It Fl r 192Recursively copy entire directories. 193Note that 194.Nm 195follows symbolic links encountered in the tree traversal. 196.It Fl S Ar program 197Name of 198.Ar program 199to use for the encrypted connection. 200The program must understand 201.Xr ssh 1 202options. 203.It Fl v 204Verbose mode. 205Causes 206.Nm 207and 208.Xr ssh 1 209to print debugging messages about their progress. 210This is helpful in 211debugging connection, authentication, and configuration problems. 212.El 213.Pp 214.Ex -std scp 215.Sh SEE ALSO 216.Xr rcp 1 , 217.Xr sftp 1 , 218.Xr ssh 1 , 219.Xr ssh-add 1 , 220.Xr ssh-agent 1 , 221.Xr ssh-keygen 1 , 222.Xr ssh_config 5 , 223.Xr sshd 8 224.Sh HISTORY 225.Nm 226is based on the 227.Xr rcp 1 228program in BSD source code from the Regents of the University of 229California. 230.Sh AUTHORS 231.An Timo Rinne Aq tri@iki.fi 232.An Tatu Ylonen Aq ylo@cs.hut.fi 233