1SCP(1) BSD General Commands Manual SCP(1)
2
4 scp — secure copy (remote file copy program)
5
7 scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
8 [-l limit] [-o ssh_option] [-P port] [-S program] source ... target
9
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 CertificateFile
75 ChallengeResponseAuthentication
76 CheckHostIP
77 Ciphers
78 Compression
79 ConnectionAttempts
80 ConnectTimeout
81 ControlMaster
82 ControlPath
83 ControlPersist
84 GlobalKnownHostsFile
85 GSSAPIAuthentication
86 GSSAPIDelegateCredentials
87 HashKnownHosts
88 Host
89 HostbasedAuthentication
90 HostbasedKeyTypes
91 HostKeyAlgorithms
92 HostKeyAlias
93 HostName
94 IdentitiesOnly
95 IdentityAgent
96 IdentityFile
97 IPQoS
98 KbdInteractiveAuthentication
99 KbdInteractiveDevices
100 KexAlgorithms
101 LogLevel
102 MACs
103 NoHostAuthenticationForLocalhost
104 NumberOfPasswordPrompts
105 PasswordAuthentication
106 PKCS11Provider
107 Port
108 PreferredAuthentications
109 ProxyCommand
110 ProxyJump
111 PubkeyAcceptedKeyTypes
112 PubkeyAuthentication
113 RekeyLimit
114 SendEnv
115 ServerAliveInterval
116 ServerAliveCountMax
117 SetEnv
118 StrictHostKeyChecking
119 TCPKeepAlive
120 UpdateHostKeys
121 User
122 UserKnownHostsFile
123 VerifyHostKeyDNS
124
125 -P port
126 Specifies the port to connect to on the remote host. Note that
127 this option is written with a capital ‘P’, because -p is already
128 reserved for preserving the times and modes of the file.
129
130 -p Preserves modification times, access times, and modes from the
131 original file.
132
133 -q Quiet mode: disables the progress meter as well as warning and
134 diagnostic messages from ssh(1).
135
136 -r Recursively copy entire directories. Note that scp follows sym‐
137 bolic links encountered in the tree traversal.
138
139 -S program
140 Name of program to use for the encrypted connection. The program
141 must understand ssh(1) options.
142
143 -v Verbose mode. Causes scp and ssh(1) to print debugging messages
144 about their progress. This is helpful in debugging connection,
145 authentication, and configuration problems.
146
148 The scp utility exits 0 on success, and >0 if an error occurs.
149
151 sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1), ssh_config(5),
152 sshd(8)
153
155 scp is based on the rcp program in BSD source code from the Regents of
156 the University of California.
157
159 Timo Rinne <tri@iki.fi>
160 Tatu Ylonen <ylo@cs.hut.fi>
161
162BSD October 26, 2019 BSD