1SCP(1)                    BSD General Commands Manual                   SCP(1)
2

NAME

4     scp — secure copy (remote file copy program)
5

SYNOPSIS

7     scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
8         [-l limit] [-o ssh_option] [-P port] [-S program] source ... target
9

DESCRIPTION

11     scp copies files between hosts on a network.  It uses ssh(1) for data
12     transfer, and uses the same authentication and provides the same security
13     as ssh(1).  scp will ask for passwords or passphrases if they are needed
14     for authentication.
15
16     The source and target may be specified as a local pathname, a remote host
17     with optional path in the form [user@]host:[path], or a URI in the form
18     scp://[user@]host[:port][/path].  Local file names can be made explicit
19     using absolute or relative pathnames to avoid scp treating file names
20     containing ‘:’ as host specifiers.
21
22     When copying between two remote hosts, if the URI format is used, a port
23     may only be specified on the target if the -3 option is used.
24
25     The options are as follows:
26
27     -3      Copies between two remote hosts are transferred through the local
28             host.  Without this option the data is copied directly between
29             the two remote hosts.  Note that this option disables the
30             progress meter.
31
32     -4      Forces scp to use IPv4 addresses only.
33
34     -6      Forces scp to use IPv6 addresses only.
35
36     -B      Selects batch mode (prevents asking for passwords or
37             passphrases).
38
39     -C      Compression enable.  Passes the -C flag to ssh(1) to enable com‐
40             pression.
41
42     -c cipher
43             Selects the cipher to use for encrypting the data transfer.  This
44             option is directly passed to ssh(1).
45
46     -F ssh_config
47             Specifies an alternative per-user configuration file for ssh.
48             This option is directly passed to ssh(1).
49
50     -i identity_file
51             Selects the file from which the identity (private key) for public
52             key authentication is read.  This option is directly passed to
53             ssh(1).
54
55     -l limit
56             Limits the used bandwidth, specified in Kbit/s.
57
58     -o ssh_option
59             Can be used to pass options to ssh in the format used in
60             ssh_config(5).  This is useful for specifying options for which
61             there is no separate scp command-line flag.  For full details of
62             the options listed below, and their possible values, see
63             ssh_config(5).
64
65                   AddressFamily
66                   BatchMode
67                   BindAddress
68                   BindInterface
69                   CanonicalDomains
70                   CanonicalizeFallbackLocal
71                   CanonicalizeHostname
72                   CanonicalizeMaxDots
73                   CanonicalizePermittedCNAMEs
74                   CASignatureAlgorithms
75                   CertificateFile
76                   ChallengeResponseAuthentication
77                   CheckHostIP
78                   Ciphers
79                   Compression
80                   ConnectionAttempts
81                   ConnectTimeout
82                   ControlMaster
83                   ControlPath
84                   ControlPersist
85                   GlobalKnownHostsFile
86                   GSSAPIAuthentication
87                   GSSAPIDelegateCredentials
88                   HashKnownHosts
89                   Host
90                   HostbasedAuthentication
91                   HostbasedKeyTypes
92                   HostKeyAlgorithms
93                   HostKeyAlias
94                   HostName
95                   IdentitiesOnly
96                   IdentityAgent
97                   IdentityFile
98                   IPQoS
99                   KbdInteractiveAuthentication
100                   KbdInteractiveDevices
101                   KexAlgorithms
102                   LogLevel
103                   MACs
104                   NoHostAuthenticationForLocalhost
105                   NumberOfPasswordPrompts
106                   PasswordAuthentication
107                   PKCS11Provider
108                   Port
109                   PreferredAuthentications
110                   ProxyCommand
111                   ProxyJump
112                   PubkeyAcceptedKeyTypes
113                   PubkeyAuthentication
114                   RekeyLimit
115                   SendEnv
116                   ServerAliveInterval
117                   ServerAliveCountMax
118                   SetEnv
119                   StrictHostKeyChecking
120                   TCPKeepAlive
121                   UpdateHostKeys
122                   User
123                   UserKnownHostsFile
124                   VerifyHostKeyDNS
125
126     -P port
127             Specifies the port to connect to on the remote host.  Note that
128             this option is written with a capital ‘P’, because -p is already
129             reserved for preserving the times and modes of the file.
130
131     -p      Preserves modification times, access times, and modes from the
132             original file.
133
134     -q      Quiet mode: disables the progress meter as well as warning and
135             diagnostic messages from ssh(1).
136
137     -r      Recursively copy entire directories.  Note that scp follows sym‐
138             bolic links encountered in the tree traversal.
139
140     -S program
141             Name of program to use for the encrypted connection.  The program
142             must understand ssh(1) options.
143
144     -v      Verbose mode.  Causes scp and ssh(1) to print debugging messages
145             about their progress.  This is helpful in debugging connection,
146             authentication, and configuration problems.
147

EXIT STATUS

149     The scp utility exits 0 on success, and >0 if an error occurs.
150

SEE ALSO

152     sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5),
153     sshd(8)
154

HISTORY

156     scp is based on the rcp program in BSD source code from the Regents of
157     the University of California.
158

AUTHORS

160     Timo Rinne <tri@iki.fi>
161     Tatu Ylonen <ylo@cs.hut.fi>
162
163BSD                              June 20, 2019                             BSD
Impressum