summaryrefslogtreecommitdiff
path: root/sftp.1
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.1')
-rw-r--r--sftp.1120
1 files changed, 88 insertions, 32 deletions
diff --git a/sftp.1 b/sftp.1
index 3b035b1d4..c89ffc30f 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.57 2004/06/21 22:41:31 djm Exp $ 1.\" $OpenBSD: sftp.1,v 1.61 2005/03/01 17:19:35 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -71,7 +71,9 @@ The second usage format will retrieve files automatically if a non-interactive
71authentication method is used; otherwise it will do so after 71authentication method is used; otherwise it will do so after
72successful interactive authentication. 72successful interactive authentication.
73.Pp 73.Pp
74The third usage format allows the sftp client to start in a remote directory. 74The third usage format allows
75.Nm
76to start in a remote directory.
75.Pp 77.Pp
76The final usage format allows for automated sessions using the 78The final usage format allows for automated sessions using the
77.Fl b 79.Fl b
@@ -159,6 +161,7 @@ For full details of the options listed below, and their possible values, see
159.It GlobalKnownHostsFile 161.It GlobalKnownHostsFile
160.It GSSAPIAuthentication 162.It GSSAPIAuthentication
161.It GSSAPIDelegateCredentials 163.It GSSAPIDelegateCredentials
164.It HashKnownHosts
162.It Host 165.It Host
163.It HostbasedAuthentication 166.It HostbasedAuthentication
164.It HostKeyAlgorithms 167.It HostKeyAlgorithms
@@ -166,6 +169,7 @@ For full details of the options listed below, and their possible values, see
166.It HostName 169.It HostName
167.It IdentityFile 170.It IdentityFile
168.It IdentitiesOnly 171.It IdentitiesOnly
172.It KbdInteractiveDevices
169.It LogLevel 173.It LogLevel
170.It MACs 174.It MACs
171.It NoHostAuthenticationForLocalhost 175.It NoHostAuthenticationForLocalhost
@@ -192,7 +196,7 @@ For full details of the options listed below, and their possible values, see
192.It Fl P Ar sftp_server_path 196.It Fl P Ar sftp_server_path
193Connect directly to a local sftp server 197Connect directly to a local sftp server
194(rather than via 198(rather than via
195.Xr ssh 1 ) 199.Xr ssh 1 ) .
196This option may be useful in debugging the client and server. 200This option may be useful in debugging the client and server.
197.It Fl R Ar num_requests 201.It Fl R Ar num_requests
198Specify how many requests may be outstanding at any one time. 202Specify how many requests may be outstanding at any one time.
@@ -223,9 +227,13 @@ Once in interactive mode,
223.Nm 227.Nm
224understands a set of commands similar to those of 228understands a set of commands similar to those of
225.Xr ftp 1 . 229.Xr ftp 1 .
226Commands are case insensitive and pathnames may be enclosed in quotes if they 230Commands are case insensitive.
227contain spaces. 231Pathnames that contain spaces must be enclosed in quotes.
228.Bl -tag -width "lmdir path" 232Any special characters contained within pathnames that are recognized by
233.Xr glob 3
234must be escaped with backslashes
235.Pq Sq \e .
236.Bl -tag -width Ds
229.It Ic bye 237.It Ic bye
230Quit 238Quit
231.Nm sftp . 239.Nm sftp .
@@ -237,6 +245,10 @@ Change group of file
237.Ar path 245.Ar path
238to 246to
239.Ar grp . 247.Ar grp .
248.Ar path
249may contain
250.Xr glob 3
251characters and may match multiple files.
240.Ar grp 252.Ar grp
241must be a numeric GID. 253must be a numeric GID.
242.It Ic chmod Ar mode Ar path 254.It Ic chmod Ar mode Ar path
@@ -244,18 +256,26 @@ Change permissions of file
244.Ar path 256.Ar path
245to 257to
246.Ar mode . 258.Ar mode .
259.Ar path
260may contain
261.Xr glob 3
262characters and may match multiple files.
247.It Ic chown Ar own Ar path 263.It Ic chown Ar own Ar path
248Change owner of file 264Change owner of file
249.Ar path 265.Ar path
250to 266to
251.Ar own . 267.Ar own .
268.Ar path
269may contain
270.Xr glob 3
271characters and may match multiple files.
252.Ar own 272.Ar own
253must be a numeric UID. 273must be a numeric UID.
254.It Ic exit 274.It Ic exit
255Quit 275Quit
256.Nm sftp . 276.Nm sftp .
257.It Xo Ic get 277.It Xo Ic get
258.Op Ar flags 278.Op Fl P
259.Ar remote-path 279.Ar remote-path
260.Op Ar local-path 280.Op Ar local-path
261.Xc 281.Xc
@@ -265,9 +285,18 @@ and store it on the local machine.
265If the local 285If the local
266path name is not specified, it is given the same name it has on the 286path name is not specified, it is given the same name it has on the
267remote machine. 287remote machine.
288.Ar remote-path
289may contain
290.Xr glob 3
291characters and may match multiple files.
292If it does and
293.Ar local-path
294is specified, then
295.Ar local-path
296must specify a directory.
268If the 297If the
269.Fl P 298.Fl P
270flag is specified, then the file's full permission and access time are 299flag is specified, then full file permissions and access times are
271copied too. 300copied too.
272.It Ic help 301.It Ic help
273Display help text. 302Display help text.
@@ -280,6 +309,14 @@ Display local directory listing of either
280or current directory if 309or current directory if
281.Ar path 310.Ar path
282is not specified. 311is not specified.
312.Ar ls-options
313may contain any flags supported by the local system's
314.Xr ls 1
315command.
316.Ar path
317may contain
318.Xr glob 3
319characters and may match multiple files.
283.It Ic lmkdir Ar path 320.It Ic lmkdir Ar path
284Create local directory specified by 321Create local directory specified by
285.Ar path . 322.Ar path .
@@ -291,36 +328,44 @@ to
291.It Ic lpwd 328.It Ic lpwd
292Print local working directory. 329Print local working directory.
293.It Xo Ic ls 330.It Xo Ic ls
294.Op Ar flags 331.Op Fl 1aflnrSt
295.Op Ar path 332.Op Ar path
296.Xc 333.Xc
297Display remote directory listing of either 334Display a remote directory listing of either
298.Ar path 335.Ar path
299or current directory if 336or the current directory if
300.Ar path 337.Ar path
301is not specified. 338is not specified.
302If the 339.Ar path
303.Fl l 340may contain
304flag is specified, then display additional details including permissions 341.Xr glob 3
305and ownership information. 342characters and may match multiple files.
306The
307.Fl n
308flag will produce a long listing with user and group information presented
309numerically.
310.Pp 343.Pp
311By default, 344The following flags are recognized and alter the behaviour of
312.Ic ls 345.Ic ls
313listings are sorted in lexicographical order. 346accordingly:
314This may be changed by specifying the 347.Bl -tag -width Ds
315.Fl S 348.It Fl 1
316(sort by file size), 349Produce single columnar output.
317.Fl t 350.It Fl a
318(sort by last modification time), or 351List files beginning with a dot
319.Fl f 352.Pq Sq \&. .
320(don't sort at all) flags. 353.It Fl f
321Additionally, the sort order may be reversed using the 354Do not sort the listing.
322.Fl r 355The default sort order is lexicographical.
323flag. 356.It Fl l
357Display additional details including permissions
358and ownership information.
359.It Fl n
360Produce a long listing with user and group information presented
361numerically.
362.It Fl r
363Reverse the sort order of the listing.
364.It Fl S
365Sort the listing by file size.
366.It Fl t
367Sort the listing by last modification time.
368.El
324.It Ic lumask Ar umask 369.It Ic lumask Ar umask
325Set local umask to 370Set local umask to
326.Ar umask . 371.Ar umask .
@@ -330,7 +375,7 @@ Create remote directory specified by
330.It Ic progress 375.It Ic progress
331Toggle display of progress meter. 376Toggle display of progress meter.
332.It Xo Ic put 377.It Xo Ic put
333.Op Ar flags 378.Op Fl P
334.Ar local-path 379.Ar local-path
335.Op Ar remote-path 380.Op Ar remote-path
336.Xc 381.Xc
@@ -339,6 +384,15 @@ Upload
339and store it on the remote machine. 384and store it on the remote machine.
340If the remote path name is not specified, it is given the same name it has 385If the remote path name is not specified, it is given the same name it has
341on the local machine. 386on the local machine.
387.Ar local-path
388may contain
389.Xr glob 3
390characters and may match multiple files.
391If it does and
392.Ar remote-path
393is specified, then
394.Ar remote-path
395must specify a directory.
342If the 396If the
343.Fl P 397.Fl P
344flag is specified, then the file's full permission and access time are 398flag is specified, then the file's full permission and access time are
@@ -379,10 +433,12 @@ Synonym for help.
379.El 433.El
380.Sh SEE ALSO 434.Sh SEE ALSO
381.Xr ftp 1 , 435.Xr ftp 1 ,
436.Xr ls 1 ,
382.Xr scp 1 , 437.Xr scp 1 ,
383.Xr ssh 1 , 438.Xr ssh 1 ,
384.Xr ssh-add 1 , 439.Xr ssh-add 1 ,
385.Xr ssh-keygen 1 , 440.Xr ssh-keygen 1 ,
441.Xr glob 3 ,
386.Xr ssh_config 5 , 442.Xr ssh_config 5 ,
387.Xr sftp-server 8 , 443.Xr sftp-server 8 ,
388.Xr sshd 8 444.Xr sshd 8