Deleted Added
full compact
sftp.0 (207311) sftp.0 (214979)
1SFTP(1) OpenBSD Reference Manual SFTP(1)
2
3NAME
4 sftp - secure file transfer program
5
6SYNOPSIS
7 sftp [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
8 [-D sftp_server_path] [-F ssh_config] [-i identity_file]
9 [-o ssh_option] [-P port] [-R num_requests] [-S program]
10 [-s subsystem | sftp_server] host
11 sftp [user@]host[:file ...]
12 sftp [user@]host[:dir[/]]
13 sftp -b batchfile [user@]host
14
15DESCRIPTION
16 sftp is an interactive file transfer program, similar to ftp(1), which
17 performs all operations over an encrypted ssh(1) transport. It may also
1SFTP(1) OpenBSD Reference Manual SFTP(1)
2
3NAME
4 sftp - secure file transfer program
5
6SYNOPSIS
7 sftp [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
8 [-D sftp_server_path] [-F ssh_config] [-i identity_file]
9 [-o ssh_option] [-P port] [-R num_requests] [-S program]
10 [-s subsystem | sftp_server] host
11 sftp [user@]host[:file ...]
12 sftp [user@]host[:dir[/]]
13 sftp -b batchfile [user@]host
14
15DESCRIPTION
16 sftp is an interactive file transfer program, similar to ftp(1), which
17 performs all operations over an encrypted ssh(1) transport. It may also
18 use many features of ssh, such as public key authentication and compres-
19 sion. sftp connects and logs into the specified host, then enters an in-
20 teractive command mode.
18 use many features of ssh, such as public key authentication and
19 compression. sftp connects and logs into the specified host, then enters
20 an interactive command mode.
21
21
22 The second usage format will retrieve files automatically if a non-inter-
23 active authentication method is used; otherwise it will do so after suc-
24 cessful interactive authentication.
22 The second usage format will retrieve files automatically if a non-
23 interactive authentication method is used; otherwise it will do so after
24 successful interactive authentication.
25
26 The third usage format allows sftp to start in a remote directory.
27
28 The final usage format allows for automated sessions using the -b option.
25
26 The third usage format allows sftp to start in a remote directory.
27
28 The final usage format allows for automated sessions using the -b option.
29 In such cases, it is necessary to configure non-interactive authentica-
30 tion to obviate the need to enter a password at connection time (see
31 sshd(8) and ssh-keygen(1) for details). The options are as follows:
29 In such cases, it is necessary to configure non-interactive
30 authentication to obviate the need to enter a password at connection time
31 (see sshd(8) and ssh-keygen(1) for details). The options are as follows:
32
33 -1 Specify the use of protocol version 1.
34
35 -2 Specify the use of protocol version 2.
36
37 -4 Forces sftp to use IPv4 addresses only.
38
39 -6 Forces sftp to use IPv6 addresses only.
40
41 -B buffer_size
42 Specify the size of the buffer that sftp uses when transferring
43 files. Larger buffers require fewer round trips at the cost of
44 higher memory consumption. The default is 32768 bytes.
45
46 -b batchfile
32
33 -1 Specify the use of protocol version 1.
34
35 -2 Specify the use of protocol version 2.
36
37 -4 Forces sftp to use IPv4 addresses only.
38
39 -6 Forces sftp to use IPv6 addresses only.
40
41 -B buffer_size
42 Specify the size of the buffer that sftp uses when transferring
43 files. Larger buffers require fewer round trips at the cost of
44 higher memory consumption. The default is 32768 bytes.
45
46 -b batchfile
47 Batch mode reads a series of commands from an input batchfile in-
48 stead of stdin. Since it lacks user interaction it should be
47 Batch mode reads a series of commands from an input batchfile
48 instead of stdin. Since it lacks user interaction it should be
49 used in conjunction with non-interactive authentication. A
50 batchfile of `-' may be used to indicate standard input. sftp
51 will abort if any of the following commands fail: get, put,
52 rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp,
53 lpwd, df, and lmkdir. Termination on error can be suppressed on
54 a command by command basis by prefixing the command with a `-'
55 character (for example, -rm /tmp/blah*).
56

--- 82 unchanged lines hidden (view full) ---

139 -q Quiet mode: disables the progress meter as well as warning and
140 diagnostic messages from ssh(1).
141
142 -R num_requests
143 Specify how many requests may be outstanding at any one time.
144 Increasing this may slightly improve file transfer speed but will
145 increase memory usage. The default is 64 outstanding requests.
146
49 used in conjunction with non-interactive authentication. A
50 batchfile of `-' may be used to indicate standard input. sftp
51 will abort if any of the following commands fail: get, put,
52 rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, chown, chgrp,
53 lpwd, df, and lmkdir. Termination on error can be suppressed on
54 a command by command basis by prefixing the command with a `-'
55 character (for example, -rm /tmp/blah*).
56

--- 82 unchanged lines hidden (view full) ---

139 -q Quiet mode: disables the progress meter as well as warning and
140 diagnostic messages from ssh(1).
141
142 -R num_requests
143 Specify how many requests may be outstanding at any one time.
144 Increasing this may slightly improve file transfer speed but will
145 increase memory usage. The default is 64 outstanding requests.
146
147 -r Recursively copy entire directories when uploading and download-
148 ing. Note that sftp does not follow symbolic links encountered
149 in the tree traversal.
147 -r Recursively copy entire directories when uploading and
148 downloading. Note that sftp does not follow symbolic links
149 encountered in the tree traversal.
150
151 -S program
152 Name of the program to use for the encrypted connection. The
153 program must understand ssh(1) options.
154
155 -s subsystem | sftp_server
156 Specifies the SSH2 subsystem or the path for an sftp server on
157 the remote host. A path is useful for using sftp over protocol
150
151 -S program
152 Name of the program to use for the encrypted connection. The
153 program must understand ssh(1) options.
154
155 -s subsystem | sftp_server
156 Specifies the SSH2 subsystem or the path for an sftp server on
157 the remote host. A path is useful for using sftp over protocol
158 version 1, or when the remote sshd(8) does not have an sftp sub-
159 system configured.
158 version 1, or when the remote sshd(8) does not have an sftp
159 subsystem configured.
160
161 -v Raise logging level. This option is also passed to ssh.
162
163INTERACTIVE COMMANDS
164 Once in interactive mode, sftp understands a set of commands similar to
165 those of ftp(1). Commands are case insensitive. Pathnames that contain
166 spaces must be enclosed in quotes. Any special characters contained
167 within pathnames that are recognized by glob(3) must be escaped with
168 backslashes (`\').
169
170 bye Quit sftp.
171
172 cd path
173 Change remote directory to path.
174
175 chgrp grp path
160
161 -v Raise logging level. This option is also passed to ssh.
162
163INTERACTIVE COMMANDS
164 Once in interactive mode, sftp understands a set of commands similar to
165 those of ftp(1). Commands are case insensitive. Pathnames that contain
166 spaces must be enclosed in quotes. Any special characters contained
167 within pathnames that are recognized by glob(3) must be escaped with
168 backslashes (`\').
169
170 bye Quit sftp.
171
172 cd path
173 Change remote directory to path.
174
175 chgrp grp path
176 Change group of file path to grp. path may contain glob(3) char-
177 acters and may match multiple files. grp must be a numeric GID.
176 Change group of file path to grp. path may contain glob(3)
177 characters and may match multiple files. grp must be a numeric
178 GID.
178
179 chmod mode path
180 Change permissions of file path to mode. path may contain
181 glob(3) characters and may match multiple files.
182
183 chown own path
179
180 chmod mode path
181 Change permissions of file path to mode. path may contain
182 glob(3) characters and may match multiple files.
183
184 chown own path
184 Change owner of file path to own. path may contain glob(3) char-
185 acters and may match multiple files. own must be a numeric UID.
185 Change owner of file path to own. path may contain glob(3)
186 characters and may match multiple files. own must be a numeric
187 UID.
186
187 df [-hi] [path]
188 Display usage information for the filesystem holding the current
189 directory (or path if specified). If the -h flag is specified,
190 the capacity information will be displayed using "human-readable"
191 suffixes. The -i flag requests display of inode information in
192 addition to capacity information. This command is only supported
193 on servers that implement the ``statvfs@openssh.com'' extension.
194
195 exit Quit sftp.
196
197 get [-Ppr] remote-path [local-path]
198 Retrieve the remote-path and store it on the local machine. If
199 the local path name is not specified, it is given the same name
200 it has on the remote machine. remote-path may contain glob(3)
188
189 df [-hi] [path]
190 Display usage information for the filesystem holding the current
191 directory (or path if specified). If the -h flag is specified,
192 the capacity information will be displayed using "human-readable"
193 suffixes. The -i flag requests display of inode information in
194 addition to capacity information. This command is only supported
195 on servers that implement the ``statvfs@openssh.com'' extension.
196
197 exit Quit sftp.
198
199 get [-Ppr] remote-path [local-path]
200 Retrieve the remote-path and store it on the local machine. If
201 the local path name is not specified, it is given the same name
202 it has on the remote machine. remote-path may contain glob(3)
201 characters and may match multiple files. If it does and local-
202 path is specified, then local-path must specify a directory.
203 characters and may match multiple files. If it does and
204 local-path is specified, then local-path must specify a
205 directory.
203
206
204 If either the -P or -p flag is specified, then full file permis-
205 sions and access times are copied too.
207 If either the -P or -p flag is specified, then full file
208 permissions and access times are copied too.
206
209
207 If the -r flag is specified then directories will be copied re-
208 cursively. Note that sftp does not follow symbolic links when
210 If the -r flag is specified then directories will be copied
211 recursively. Note that sftp does not follow symbolic links when
209 performing recursive transfers.
210
211 help Display help text.
212
213 lcd path
214 Change local directory to path.
215
216 lls [ls-options [path]]
212 performing recursive transfers.
213
214 help Display help text.
215
216 lcd path
217 Change local directory to path.
218
219 lls [ls-options [path]]
217 Display local directory listing of either path or current direc-
218 tory if path is not specified. ls-options may contain any flags
219 supported by the local system's ls(1) command. path may contain
220 glob(3) characters and may match multiple files.
220 Display local directory listing of either path or current
221 directory if path is not specified. ls-options may contain any
222 flags supported by the local system's ls(1) command. path may
223 contain glob(3) characters and may match multiple files.
221
222 lmkdir path
223 Create local directory specified by path.
224
225 ln oldpath newpath
226 Create a symbolic link from oldpath to newpath.
227
228 lpwd Print local working directory.

--- 5 unchanged lines hidden (view full) ---

234
235 The following flags are recognized and alter the behaviour of ls
236 accordingly:
237
238 -1 Produce single columnar output.
239
240 -a List files beginning with a dot (`.').
241
224
225 lmkdir path
226 Create local directory specified by path.
227
228 ln oldpath newpath
229 Create a symbolic link from oldpath to newpath.
230
231 lpwd Print local working directory.

--- 5 unchanged lines hidden (view full) ---

237
238 The following flags are recognized and alter the behaviour of ls
239 accordingly:
240
241 -1 Produce single columnar output.
242
243 -a List files beginning with a dot (`.').
244
242 -f Do not sort the listing. The default sort order is lexi-
243 cographical.
245 -f Do not sort the listing. The default sort order is
246 lexicographical.
244
245 -h When used with a long format option, use unit suffixes:
246 Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte,
247 and Exabyte in order to reduce the number of digits to
248 four or fewer using powers of 2 for sizes (K=1024,
249 M=1048576, etc.).
250
247
248 -h When used with a long format option, use unit suffixes:
249 Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte,
250 and Exabyte in order to reduce the number of digits to
251 four or fewer using powers of 2 for sizes (K=1024,
252 M=1048576, etc.).
253
251 -l Display additional details including permissions and own-
252 ership information.
254 -l Display additional details including permissions and
255 ownership information.
253
254 -n Produce a long listing with user and group information
255 presented numerically.
256
257 -r Reverse the sort order of the listing.
258
259 -S Sort the listing by file size.
260

--- 4 unchanged lines hidden (view full) ---

265
266 mkdir path
267 Create remote directory specified by path.
268
269 progress
270 Toggle display of progress meter.
271
272 put [-Ppr] local-path [remote-path]
256
257 -n Produce a long listing with user and group information
258 presented numerically.
259
260 -r Reverse the sort order of the listing.
261
262 -S Sort the listing by file size.
263

--- 4 unchanged lines hidden (view full) ---

268
269 mkdir path
270 Create remote directory specified by path.
271
272 progress
273 Toggle display of progress meter.
274
275 put [-Ppr] local-path [remote-path]
273 Upload local-path and store it on the remote machine. If the re-
274 mote path name is not specified, it is given the same name it has
275 on the local machine. local-path may contain glob(3) characters
276 and may match multiple files. If it does and remote-path is
277 specified, then remote-path must specify a directory.
276 Upload local-path and store it on the remote machine. If the
277 remote path name is not specified, it is given the same name it
278 has on the local machine. local-path may contain glob(3)
279 characters and may match multiple files. If it does and
280 remote-path is specified, then remote-path must specify a
281 directory.
278
282
279 If ether the -P or -p flag is specified, then full file permis-
280 sions and access times are copied too.
283 If ether the -P or -p flag is specified, then full file
284 permissions and access times are copied too.
281
285
282 If the -r flag is specified then directories will be copied re-
283 cursively. Note that sftp does not follow symbolic links when
286 If the -r flag is specified then directories will be copied
287 recursively. Note that sftp does not follow symbolic links when
284 performing recursive transfers.
285
286 pwd Display remote working directory.
287
288 quit Quit sftp.
289
290 rename oldpath newpath
291 Rename remote file from oldpath to newpath.

--- 16 unchanged lines hidden (view full) ---

308 ! Escape to local shell.
309
310 ? Synonym for help.
311
312SEE ALSO
313 ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3),
314 ssh_config(5), sftp-server(8), sshd(8)
315
288 performing recursive transfers.
289
290 pwd Display remote working directory.
291
292 quit Quit sftp.
293
294 rename oldpath newpath
295 Rename remote file from oldpath to newpath.

--- 16 unchanged lines hidden (view full) ---

312 ! Escape to local shell.
313
314 ? Synonym for help.
315
316SEE ALSO
317 ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3),
318 ssh_config(5), sftp-server(8), sshd(8)
319
316 T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
317 filexfer-00.txt, January 2001, work in progress material.
320 T. Ylonen, S. Lehtinen, SSH File Transfer Protocol,
321 draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress
322 material.
318
323
319OpenBSD 4.7 February 8, 2010 5
324OpenBSD 4.8 February 8, 2010 OpenBSD 4.8