1.\" $NetBSD: scp.1,v 1.4 2011/07/25 03:03:10 christos 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.56 2010/12/09 14:13:32 jmc Exp $ 14.\" 15.Dd December 9, 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 12346BCpqrv 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 3 81Copies between two remote hosts are transferred through the local host. 82Without this option the data is copied directly between the two remote 83hosts. 84Note that this option disables the progress meter. 85.It Fl 4 86Forces 87.Nm 88to use IPv4 addresses only. 89.It Fl 6 90Forces 91.Nm 92to use IPv6 addresses only. 93.It Fl B 94Selects batch mode (prevents asking for passwords or passphrases). 95.It Fl C 96Compression enable. 97Passes the 98.Fl C 99flag to 100.Xr ssh 1 101to enable compression. 102.It Fl c Ar cipher 103Selects the cipher to use for encrypting the data transfer. 104This option is directly passed to 105.Xr ssh 1 . 106.It Fl F Ar ssh_config 107Specifies an alternative 108per-user configuration file for 109.Nm ssh . 110This option is directly passed to 111.Xr ssh 1 . 112.It Fl i Ar identity_file 113Selects the file from which the identity (private key) for public key 114authentication is read. 115This option is directly passed to 116.Xr ssh 1 . 117.It Fl l Ar limit 118Limits the used bandwidth, specified in Kbit/s. 119.It Fl o Ar ssh_option 120Can be used to pass options to 121.Nm ssh 122in the format used in 123.Xr ssh_config 5 . 124This is useful for specifying options 125for which there is no separate 126.Nm scp 127command-line flag. 128For full details of the options listed below, and their possible values, see 129.Xr ssh_config 5 . 130.Pp 131.Bl -tag -width Ds -offset indent -compact 132.It AddressFamily 133.It BatchMode 134.It BindAddress 135.It ChallengeResponseAuthentication 136.It CheckHostIP 137.It Cipher 138.It Ciphers 139.It Compression 140.It CompressionLevel 141.It ConnectionAttempts 142.It ConnectTimeout 143.It ControlMaster 144.It ControlPath 145.It GlobalKnownHostsFile 146.It GSSAPIAuthentication 147.It GSSAPIDelegateCredentials 148.It HashKnownHosts 149.It Host 150.It HostbasedAuthentication 151.It HostKeyAlgorithms 152.It HostKeyAlias 153.It HostName 154.It IdentityFile 155.It IdentitiesOnly 156.It IPQoS 157.It KbdInteractiveDevices 158.It KexAlgorithms 159.It LogLevel 160.It MACs 161.It NoHostAuthenticationForLocalhost 162.It NumberOfPasswordPrompts 163.It PasswordAuthentication 164.It PKCS11Provider 165.It Port 166.It PreferredAuthentications 167.It Protocol 168.It ProxyCommand 169.It PubkeyAuthentication 170.It RekeyLimit 171.It RhostsRSAAuthentication 172.It RSAAuthentication 173.It SendEnv 174.It ServerAliveInterval 175.It ServerAliveCountMax 176.It StrictHostKeyChecking 177.It TCPKeepAlive 178.It UsePrivilegedPort 179.It User 180.It UserKnownHostsFile 181.It VerifyHostKeyDNS 182.El 183.It Fl P Ar port 184Specifies the port to connect to on the remote host. 185Note that this option is written with a capital 186.Sq P , 187because 188.Fl p 189is already reserved for preserving the times and modes of the file in 190.Xr rcp 1 . 191.It Fl p 192Preserves modification times, access times, and modes from the 193original file. 194.It Fl q 195Quiet mode: disables the progress meter as well as warning and diagnostic 196messages from 197.Xr ssh 1 . 198.It Fl r 199Recursively copy entire directories. 200Note that 201.Nm 202follows symbolic links encountered in the tree traversal. 203.It Fl S Ar program 204Name of 205.Ar program 206to use for the encrypted connection. 207The program must understand 208.Xr ssh 1 209options. 210.It Fl v 211Verbose mode. 212Causes 213.Nm 214and 215.Xr ssh 1 216to print debugging messages about their progress. 217This is helpful in 218debugging connection, authentication, and configuration problems. 219.El 220.Sh EXIT STATUS 221.Ex -std scp 222.Sh SEE ALSO 223.Xr rcp 1 , 224.Xr sftp 1 , 225.Xr ssh 1 , 226.Xr ssh-add 1 , 227.Xr ssh-agent 1 , 228.Xr ssh-keygen 1 , 229.Xr ssh_config 5 , 230.Xr sshd 8 231.Sh HISTORY 232.Nm 233is based on the 234.Xr rcp 1 235program in BSD source code from the Regents of the University of 236California. 237.Sh AUTHORS 238.An Timo Rinne Aq tri@iki.fi 239.An Tatu Ylonen Aq ylo@cs.hut.fi 240