blob: d7df8bbeebba6ca0e840934e81197e5cbe2c370a [file] [log] [blame]
Darren Tucker46bbbe32009-10-07 08:21:48 +11001.\" $OpenBSD: sftp.1,v 1.70 2009/08/12 00:13:00 djm Exp $
Damien Miller33804262001-02-04 23:20:18 +11002.\"
Ben Lindstrom92a2e382001-03-05 06:59:27 +00003.\" Copyright (c) 2001 Damien Miller. All rights reserved.
Damien Miller33804262001-02-04 23:20:18 +11004.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
Darren Tucker46bbbe32009-10-07 08:21:48 +110025.Dd $Mdocdate: August 12 2009 $
Damien Miller33804262001-02-04 23:20:18 +110026.Dt SFTP 1
27.Os
28.Sh NAME
29.Nm sftp
Damien Miller50677922003-05-23 18:44:04 +100030.Nd secure file transfer program
Damien Miller33804262001-02-04 23:20:18 +110031.Sh SYNOPSIS
Damien Millerd6ead282003-05-14 19:30:38 +100032.Nm sftp
Damien Miller495dca32003-04-01 21:42:14 +100033.Bk -words
Darren Tucker46bbbe32009-10-07 08:21:48 +110034.Op Fl 1246Cqv
Damien Miller81b6e782002-02-08 22:06:03 +110035.Op Fl B Ar buffer_size
Darren Tucker1f203942003-10-15 15:50:42 +100036.Op Fl b Ar batchfile
Darren Tucker46bbbe32009-10-07 08:21:48 +110037.Op Fl c Ar cipher
Damien Miller81b6e782002-02-08 22:06:03 +110038.Op Fl F Ar ssh_config
Darren Tucker46bbbe32009-10-07 08:21:48 +110039.Op Fl i Ar identity_path
Darren Tucker1f203942003-10-15 15:50:42 +100040.Op Fl o Ar ssh_option
41.Op Fl P Ar sftp_server_path
Damien Miller16a13332002-02-13 14:03:56 +110042.Op Fl R Ar num_requests
Ben Lindstrom6a337632001-09-18 05:47:32 +000043.Op Fl S Ar program
Darren Tucker1f203942003-10-15 15:50:42 +100044.Op Fl s Ar subsystem | sftp_server
Ben Lindstrom6a337632001-09-18 05:47:32 +000045.Ar host
Damien Miller495dca32003-04-01 21:42:14 +100046.Ek
Damien Millerd6ead282003-05-14 19:30:38 +100047.Nm sftp
Damien Miller7ebfad72008-12-09 14:12:33 +110048.Oo Ar user Ns @ Oc Ns
49.Ar host Ns Op : Ns Ar
Damien Millerd6ead282003-05-14 19:30:38 +100050.Nm sftp
Damien Miller7ebfad72008-12-09 14:12:33 +110051.Oo Ar user Ns @ Oc Ns
Damien Miller495dca32003-04-01 21:42:14 +100052.Ar host Ns Oo : Ns Ar dir Ns
Damien Miller62fd18a2009-01-28 16:14:09 +110053.Op Ar / Oc
Damien Millerd6ead282003-05-14 19:30:38 +100054.Nm sftp
Damien Millerfb7508e2003-05-14 13:47:07 +100055.Fl b Ar batchfile
Damien Millerc2b98272003-09-03 12:13:30 +100056.Oo Ar user Ns @ Oc Ns Ar host
Damien Miller33804262001-02-04 23:20:18 +110057.Sh DESCRIPTION
58.Nm
59is an interactive file transfer program, similar to
60.Xr ftp 1 ,
61which performs all operations over an encrypted
62.Xr ssh 1
63transport.
64It may also use many features of ssh, such as public key authentication and
65compression.
66.Nm
67connects and logs into the specified
Ben Lindstromaafff9c2001-05-06 03:01:02 +000068.Ar host ,
Damien Miller33804262001-02-04 23:20:18 +110069then enters an interactive command mode.
70.Pp
Ben Lindstrom24643222001-06-25 05:08:11 +000071The second usage format will retrieve files automatically if a non-interactive
Ben Lindstromaafff9c2001-05-06 03:01:02 +000072authentication method is used; otherwise it will do so after
73successful interactive authentication.
Ben Lindstrom63667f62001-04-13 00:00:14 +000074.Pp
Darren Tucker16e254d2004-12-06 22:46:45 +110075The third usage format allows
76.Nm
77to start in a remote directory.
Ben Lindstrom63667f62001-04-13 00:00:14 +000078.Pp
Damien Miller50677922003-05-23 18:44:04 +100079The final usage format allows for automated sessions using the
Damien Millerfb7508e2003-05-14 13:47:07 +100080.Fl b
Damien Miller50677922003-05-23 18:44:04 +100081option.
Damien Miller134eb812005-12-31 16:22:55 +110082In such cases, it is necessary to configure non-interactive authentication
Damien Miller50677922003-05-23 18:44:04 +100083to obviate the need to enter a password at connection time (see
Damien Millerfb7508e2003-05-14 13:47:07 +100084.Xr sshd 8
Damien Millerd6ead282003-05-14 19:30:38 +100085and
Damien Millerfb7508e2003-05-14 13:47:07 +100086.Xr ssh-keygen 1
Damien Miller50677922003-05-23 18:44:04 +100087for details).
Damien Miller33804262001-02-04 23:20:18 +110088The options are as follows:
89.Bl -tag -width Ds
Darren Tucker1f203942003-10-15 15:50:42 +100090.It Fl 1
91Specify the use of protocol version 1.
Darren Tucker46bbbe32009-10-07 08:21:48 +110092.It Fl 2
93Specify the use of protocol version 2.
94.It Fl 4
95Forces
96.Nm
97to use IPv4 addresses only.
98.It Fl 6
99Forces
100.Nm
101to use IPv6 addresses only.
Darren Tucker1f203942003-10-15 15:50:42 +1000102.It Fl B Ar buffer_size
103Specify the size of the buffer that
104.Nm
105uses when transferring files.
106Larger buffers require fewer round trips at the cost of higher
107memory consumption.
108The default is 32768 bytes.
Ben Lindstrom562c26b2001-03-07 01:26:48 +0000109.It Fl b Ar batchfile
110Batch mode reads a series of commands from an input
Ben Lindstrom283cb822001-03-09 00:09:02 +0000111.Ar batchfile
Ben Lindstrom562c26b2001-03-07 01:26:48 +0000112instead of
Ben Lindstrom283cb822001-03-09 00:09:02 +0000113.Em stdin .
114Since it lacks user interaction it should be used in conjunction with
Damien Miller86a39682004-01-21 11:00:04 +1100115non-interactive authentication.
Damien Miller44f75c12004-01-21 10:58:47 +1100116A
Damien Miller86a39682004-01-21 11:00:04 +1100117.Ar batchfile
118of
119.Sq \-
Damien Miller44f75c12004-01-21 10:58:47 +1100120may be used to indicate standard input.
Ben Lindstrom283cb822001-03-09 00:09:02 +0000121.Nm
Ben Lindstrom24643222001-06-25 05:08:11 +0000122will abort if any of the following
123commands fail:
Ben Lindstrom3612bda2002-03-05 01:26:38 +0000124.Ic get , put , rename , ln ,
Damien Miller495dca32003-04-01 21:42:14 +1000125.Ic rm , mkdir , chdir , ls ,
Damien Miller64058cb2008-05-19 14:54:25 +1000126.Ic lchdir , chmod , chown ,
127.Ic chgrp , lpwd , df ,
Ben Lindstrom562c26b2001-03-07 01:26:48 +0000128and
Ben Lindstrom283cb822001-03-09 00:09:02 +0000129.Ic lmkdir .
Damien Miller495dca32003-04-01 21:42:14 +1000130Termination on error can be suppressed on a command by command basis by
131prefixing the command with a
Damien Miller86a39682004-01-21 11:00:04 +1100132.Sq \-
Damien Miller50677922003-05-23 18:44:04 +1000133character (for example,
134.Ic -rm /tmp/blah* ) .
Darren Tucker46bbbe32009-10-07 08:21:48 +1100135.It Fl c Ar cipher
136Selects the cipher to use for encrypting the data transfers.
137This option is directly passed to
138.Xr ssh 1 .
Darren Tucker1f203942003-10-15 15:50:42 +1000139.It Fl C
140Enables compression (via ssh's
141.Fl C
142flag).
143.It Fl F Ar ssh_config
144Specifies an alternative
145per-user configuration file for
146.Xr ssh 1 .
147This option is directly passed to
148.Xr ssh 1 .
Darren Tucker46bbbe32009-10-07 08:21:48 +1100149.It Fl i Ar identity_file
150Selects the file from which the identity (private key) for public key
151authentication is read.
152This option is directly passed to
153.Xr ssh 1 .
Damien Miller33804262001-02-04 23:20:18 +1100154.It Fl o Ar ssh_option
Ben Lindstrom14c62eb2001-08-15 23:25:46 +0000155Can be used to pass options to
156.Nm ssh
Ben Lindstrom3072aae2002-06-21 01:02:39 +0000157in the format used in
158.Xr ssh_config 5 .
159This is useful for specifying options
Ben Lindstrom14c62eb2001-08-15 23:25:46 +0000160for which there is no separate
161.Nm sftp
Damien Miller50677922003-05-23 18:44:04 +1000162command-line flag.
163For example, to specify an alternate port use:
Ben Lindstrom6a337632001-09-18 05:47:32 +0000164.Ic sftp -oPort=24 .
Darren Tucker1f203942003-10-15 15:50:42 +1000165For full details of the options listed below, and their possible values, see
166.Xr ssh_config 5 .
167.Pp
168.Bl -tag -width Ds -offset indent -compact
169.It AddressFamily
170.It BatchMode
171.It BindAddress
172.It ChallengeResponseAuthentication
173.It CheckHostIP
174.It Cipher
175.It Ciphers
Darren Tucker1f203942003-10-15 15:50:42 +1000176.It Compression
177.It CompressionLevel
178.It ConnectionAttempts
Darren Tucker3d5cbb72004-05-03 09:13:15 +1000179.It ConnectTimeout
Damien Miller0e220db2004-06-15 10:34:08 +1000180.It ControlMaster
181.It ControlPath
Darren Tucker1f203942003-10-15 15:50:42 +1000182.It GlobalKnownHostsFile
183.It GSSAPIAuthentication
184.It GSSAPIDelegateCredentials
Damien Miller27e9c512005-03-02 12:04:16 +1100185.It HashKnownHosts
Darren Tucker1f203942003-10-15 15:50:42 +1000186.It Host
187.It HostbasedAuthentication
188.It HostKeyAlgorithms
189.It HostKeyAlias
190.It HostName
191.It IdentityFile
Damien Millerbd394c32004-03-08 23:12:36 +1100192.It IdentitiesOnly
Darren Tucker636ca902004-11-05 20:22:00 +1100193.It KbdInteractiveDevices
Darren Tucker1f203942003-10-15 15:50:42 +1000194.It LogLevel
195.It MACs
196.It NoHostAuthenticationForLocalhost
197.It NumberOfPasswordPrompts
198.It PasswordAuthentication
199.It Port
200.It PreferredAuthentications
201.It Protocol
202.It ProxyCommand
203.It PubkeyAuthentication
Darren Tucker62388b22006-01-20 11:31:47 +1100204.It RekeyLimit
Darren Tucker1f203942003-10-15 15:50:42 +1000205.It RhostsRSAAuthentication
206.It RSAAuthentication
Darren Tucker7a6c0662004-05-02 22:14:03 +1000207.It SendEnv
Damien Miller509b0102003-12-17 16:33:10 +1100208.It ServerAliveInterval
209.It ServerAliveCountMax
Darren Tucker1f203942003-10-15 15:50:42 +1000210.It SmartcardDevice
211.It StrictHostKeyChecking
Damien Miller12c150e2003-12-17 16:31:10 +1100212.It TCPKeepAlive
Darren Tucker1f203942003-10-15 15:50:42 +1000213.It UsePrivilegedPort
214.It User
215.It UserKnownHostsFile
216.It VerifyHostKeyDNS
Darren Tucker1f203942003-10-15 15:50:42 +1000217.El
218.It Fl P Ar sftp_server_path
Damien Miller50677922003-05-23 18:44:04 +1000219Connect directly to a local sftp server
Damien Miller81b6e782002-02-08 22:06:03 +1100220(rather than via
Darren Tucker0133a722004-12-06 22:44:32 +1100221.Xr ssh 1 ) .
Damien Miller81b6e782002-02-08 22:06:03 +1100222This option may be useful in debugging the client and server.
Darren Tucker46bbbe32009-10-07 08:21:48 +1100223.It Fl q
224Quiet mode: disables the progress meter as well as warning and
225diagnostic messages from
226.Xr ssh 1 .
Damien Miller16a13332002-02-13 14:03:56 +1100227.It Fl R Ar num_requests
Damien Miller50677922003-05-23 18:44:04 +1000228Specify how many requests may be outstanding at any one time.
229Increasing this may slightly improve file transfer speed
230but will increase memory usage.
Damien Miller94717b02008-07-16 21:17:23 +1000231The default is 64 outstanding requests.
Ben Lindstrom6a337632001-09-18 05:47:32 +0000232.It Fl S Ar program
233Name of the
234.Ar program
235to use for the encrypted connection.
236The program must understand
237.Xr ssh 1
238options.
Darren Tucker1f203942003-10-15 15:50:42 +1000239.It Fl s Ar subsystem | sftp_server
240Specifies the SSH2 subsystem or the path for an sftp server
241on the remote host.
242A path is useful for using
243.Nm
244over protocol version 1, or when the remote
245.Xr sshd 8
246does not have an sftp subsystem configured.
247.It Fl v
248Raise logging level.
249This option is also passed to ssh.
Damien Miller33804262001-02-04 23:20:18 +1100250.El
251.Sh INTERACTIVE COMMANDS
Damien Millerd7686fd2001-02-10 00:40:03 +1100252Once in interactive mode,
253.Nm
Ben Lindstrom24643222001-06-25 05:08:11 +0000254understands a set of commands similar to those of
Damien Miller33804262001-02-04 23:20:18 +1100255.Xr ftp 1 .
Darren Tucker16e254d2004-12-06 22:46:45 +1100256Commands are case insensitive.
257Pathnames that contain spaces must be enclosed in quotes.
258Any special characters contained within pathnames that are recognized by
259.Xr glob 3
260must be escaped with backslashes
261.Pq Sq \e .
262.Bl -tag -width Ds
Ben Lindstrom59e12492001-08-15 23:22:56 +0000263.It Ic bye
Damien Miller50677922003-05-23 18:44:04 +1000264Quit
265.Nm sftp .
Damien Millerd7686fd2001-02-10 00:40:03 +1100266.It Ic cd Ar path
Ben Lindstrom24643222001-06-25 05:08:11 +0000267Change remote directory to
Damien Millerd7686fd2001-02-10 00:40:03 +1100268.Ar path .
Damien Millerd7686fd2001-02-10 00:40:03 +1100269.It Ic chgrp Ar grp Ar path
Ben Lindstrom24643222001-06-25 05:08:11 +0000270Change group of file
Damien Millerd7686fd2001-02-10 00:40:03 +1100271.Ar path
272to
Damien Miller33804262001-02-04 23:20:18 +1100273.Ar grp .
Darren Tucker16e254d2004-12-06 22:46:45 +1100274.Ar path
275may contain
276.Xr glob 3
277characters and may match multiple files.
Damien Miller33804262001-02-04 23:20:18 +1100278.Ar grp
Damien Millerd7686fd2001-02-10 00:40:03 +1100279must be a numeric GID.
280.It Ic chmod Ar mode Ar path
Ben Lindstrom24643222001-06-25 05:08:11 +0000281Change permissions of file
Damien Millerd7686fd2001-02-10 00:40:03 +1100282.Ar path
283to
284.Ar mode .
Darren Tucker16e254d2004-12-06 22:46:45 +1100285.Ar path
286may contain
287.Xr glob 3
288characters and may match multiple files.
Damien Millerd7686fd2001-02-10 00:40:03 +1100289.It Ic chown Ar own Ar path
Ben Lindstrom24643222001-06-25 05:08:11 +0000290Change owner of file
Damien Millerd7686fd2001-02-10 00:40:03 +1100291.Ar path
292to
Damien Miller33804262001-02-04 23:20:18 +1100293.Ar own .
Darren Tucker16e254d2004-12-06 22:46:45 +1100294.Ar path
295may contain
296.Xr glob 3
297characters and may match multiple files.
Damien Miller33804262001-02-04 23:20:18 +1100298.Ar own
299must be a numeric UID.
Damien Millerd671e5a2008-05-19 14:53:33 +1000300.It Xo Ic df
301.Op Fl hi
302.Op Ar path
303.Xc
304Display usage information for the filesystem holding the current directory
305(or
306.Ar path
307if specified).
308If the
309.Fl h
310flag is specified, the capacity information will be displayed using
311"human-readable" suffixes.
312The
313.Fl i
314flag requests display of inode information in addition to capacity information.
315This command is only supported on servers that implement the
316.Dq statvfs@openssh.com
317extension.
Ben Lindstromc9b6eab2001-03-07 01:29:17 +0000318.It Ic exit
Damien Miller50677922003-05-23 18:44:04 +1000319Quit
320.Nm sftp .
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000321.It Xo Ic get
Darren Tucker16e254d2004-12-06 22:46:45 +1100322.Op Fl P
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000323.Ar remote-path
324.Op Ar local-path
325.Xc
Damien Miller33804262001-02-04 23:20:18 +1100326Retrieve the
Damien Millerd7686fd2001-02-10 00:40:03 +1100327.Ar remote-path
Damien Miller33804262001-02-04 23:20:18 +1100328and store it on the local machine.
329If the local
Ben Lindstrom24643222001-06-25 05:08:11 +0000330path name is not specified, it is given the same name it has on the
Damien Miller50677922003-05-23 18:44:04 +1000331remote machine.
Darren Tucker16e254d2004-12-06 22:46:45 +1100332.Ar remote-path
333may contain
334.Xr glob 3
335characters and may match multiple files.
336If it does and
337.Ar local-path
338is specified, then
339.Ar local-path
340must specify a directory.
Damien Miller50677922003-05-23 18:44:04 +1000341If the
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000342.Fl P
Darren Tucker16e254d2004-12-06 22:46:45 +1100343flag is specified, then full file permissions and access times are
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000344copied too.
Ben Lindstromc9b6eab2001-03-07 01:29:17 +0000345.It Ic help
346Display help text.
Darren Tucker1f203942003-10-15 15:50:42 +1000347.It Ic lcd Ar path
348Change local directory to
349.Ar path .
Damien Millerd7686fd2001-02-10 00:40:03 +1100350.It Ic lls Op Ar ls-options Op Ar path
Ben Lindstrom24643222001-06-25 05:08:11 +0000351Display local directory listing of either
Damien Miller33804262001-02-04 23:20:18 +1100352.Ar path
353or current directory if
354.Ar path
Damien Millerd7686fd2001-02-10 00:40:03 +1100355is not specified.
Darren Tucker16e254d2004-12-06 22:46:45 +1100356.Ar ls-options
357may contain any flags supported by the local system's
358.Xr ls 1
359command.
360.Ar path
361may contain
362.Xr glob 3
363characters and may match multiple files.
Damien Millerd7686fd2001-02-10 00:40:03 +1100364.It Ic lmkdir Ar path
Damien Miller33804262001-02-04 23:20:18 +1100365Create local directory specified by
Damien Millerd7686fd2001-02-10 00:40:03 +1100366.Ar path .
Damien Miller058316f2001-03-08 10:08:49 +1100367.It Ic ln Ar oldpath Ar newpath
Ben Lindstrom24643222001-06-25 05:08:11 +0000368Create a symbolic link from
Damien Miller058316f2001-03-08 10:08:49 +1100369.Ar oldpath
370to
371.Ar newpath .
Damien Millerd7686fd2001-02-10 00:40:03 +1100372.It Ic lpwd
373Print local working directory.
Damien Millere1a49812002-09-12 09:54:25 +1000374.It Xo Ic ls
Darren Tucker16e254d2004-12-06 22:46:45 +1100375.Op Fl 1aflnrSt
Damien Millere1a49812002-09-12 09:54:25 +1000376.Op Ar path
377.Xc
Darren Tucker16e254d2004-12-06 22:46:45 +1100378Display a remote directory listing of either
Damien Miller33804262001-02-04 23:20:18 +1100379.Ar path
Darren Tucker16e254d2004-12-06 22:46:45 +1100380or the current directory if
Damien Miller33804262001-02-04 23:20:18 +1100381.Ar path
Damien Miller50677922003-05-23 18:44:04 +1000382is not specified.
Darren Tucker16e254d2004-12-06 22:46:45 +1100383.Ar path
384may contain
385.Xr glob 3
386characters and may match multiple files.
Darren Tucker15ca6e82004-06-22 13:08:21 +1000387.Pp
Darren Tucker16e254d2004-12-06 22:46:45 +1100388The following flags are recognized and alter the behaviour of
Darren Tucker15ca6e82004-06-22 13:08:21 +1000389.Ic ls
Darren Tucker16e254d2004-12-06 22:46:45 +1100390accordingly:
391.Bl -tag -width Ds
392.It Fl 1
393Produce single columnar output.
394.It Fl a
395List files beginning with a dot
396.Pq Sq \&. .
397.It Fl f
398Do not sort the listing.
399The default sort order is lexicographical.
400.It Fl l
401Display additional details including permissions
402and ownership information.
403.It Fl n
404Produce a long listing with user and group information presented
405numerically.
406.It Fl r
407Reverse the sort order of the listing.
408.It Fl S
409Sort the listing by file size.
410.It Fl t
411Sort the listing by last modification time.
412.El
Damien Millerd7686fd2001-02-10 00:40:03 +1100413.It Ic lumask Ar umask
Ben Lindstrom24643222001-06-25 05:08:11 +0000414Set local umask to
Damien Millerd7686fd2001-02-10 00:40:03 +1100415.Ar umask .
416.It Ic mkdir Ar path
417Create remote directory specified by
418.Ar path .
Damien Miller62d57f62003-01-10 21:43:24 +1100419.It Ic progress
420Toggle display of progress meter.
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000421.It Xo Ic put
Darren Tucker16e254d2004-12-06 22:46:45 +1100422.Op Fl P
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000423.Ar local-path
Ben Lindstromd5767812002-12-23 02:23:37 +0000424.Op Ar remote-path
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000425.Xc
Damien Miller33804262001-02-04 23:20:18 +1100426Upload
Damien Millerd7686fd2001-02-10 00:40:03 +1100427.Ar local-path
Damien Miller50677922003-05-23 18:44:04 +1000428and store it on the remote machine.
429If the remote path name is not specified, it is given the same name it has
430on the local machine.
Darren Tucker16e254d2004-12-06 22:46:45 +1100431.Ar local-path
432may contain
433.Xr glob 3
434characters and may match multiple files.
435If it does and
436.Ar remote-path
437is specified, then
438.Ar remote-path
439must specify a directory.
Damien Miller50677922003-05-23 18:44:04 +1000440If the
Ben Lindstrom9d4f2c82001-02-15 03:22:45 +0000441.Fl P
442flag is specified, then the file's full permission and access time are
443copied too.
Damien Millerd7686fd2001-02-10 00:40:03 +1100444.It Ic pwd
445Display remote working directory.
Damien Millerd7686fd2001-02-10 00:40:03 +1100446.It Ic quit
Damien Miller50677922003-05-23 18:44:04 +1000447Quit
448.Nm sftp .
Damien Millerd7686fd2001-02-10 00:40:03 +1100449.It Ic rename Ar oldpath Ar newpath
Damien Miller33804262001-02-04 23:20:18 +1100450Rename remote file from
451.Ar oldpath
452to
Damien Millerd7686fd2001-02-10 00:40:03 +1100453.Ar newpath .
Damien Millerd7686fd2001-02-10 00:40:03 +1100454.It Ic rm Ar path
Damien Miller33804262001-02-04 23:20:18 +1100455Delete remote file specified by
Damien Millerd7686fd2001-02-10 00:40:03 +1100456.Ar path .
Darren Tucker1f203942003-10-15 15:50:42 +1000457.It Ic rmdir Ar path
458Remove remote directory specified by
459.Ar path .
Damien Miller058316f2001-03-08 10:08:49 +1100460.It Ic symlink Ar oldpath Ar newpath
Ben Lindstrom24643222001-06-25 05:08:11 +0000461Create a symbolic link from
Damien Miller058316f2001-03-08 10:08:49 +1100462.Ar oldpath
463to
464.Ar newpath .
Damien Miller63421802003-01-08 14:05:23 +1100465.It Ic version
466Display the
467.Nm
468protocol version.
Damien Miller62fd18a2009-01-28 16:14:09 +1100469.It Ic \&! Ns Ar command
Ben Lindstrom24643222001-06-25 05:08:11 +0000470Execute
Damien Miller33804262001-02-04 23:20:18 +1100471.Ar command
Damien Millerd7686fd2001-02-10 00:40:03 +1100472in local shell.
Damien Millerc2b98272003-09-03 12:13:30 +1000473.It Ic \&!
Damien Millerd7686fd2001-02-10 00:40:03 +1100474Escape to local shell.
Damien Millerc2b98272003-09-03 12:13:30 +1000475.It Ic \&?
Damien Millerd7686fd2001-02-10 00:40:03 +1100476Synonym for help.
477.El
Damien Miller33804262001-02-04 23:20:18 +1100478.Sh SEE ALSO
Darren Tucker1f203942003-10-15 15:50:42 +1000479.Xr ftp 1 ,
Darren Tucker16e254d2004-12-06 22:46:45 +1100480.Xr ls 1 ,
Ben Lindstrom160ec622001-04-22 17:17:46 +0000481.Xr scp 1 ,
Damien Miller33804262001-02-04 23:20:18 +1100482.Xr ssh 1 ,
483.Xr ssh-add 1 ,
484.Xr ssh-keygen 1 ,
Darren Tucker16e254d2004-12-06 22:46:45 +1100485.Xr glob 3 ,
Ben Lindstrom3072aae2002-06-21 01:02:39 +0000486.Xr ssh_config 5 ,
Ben Lindstrom160ec622001-04-22 17:17:46 +0000487.Xr sftp-server 8 ,
488.Xr sshd 8
489.Rs
Ben Lindstrom90fd0602001-06-25 04:45:33 +0000490.%A T. Ylonen
491.%A S. Lehtinen
Ben Lindstrom160ec622001-04-22 17:17:46 +0000492.%T "SSH File Transfer Protocol"
493.%N draft-ietf-secsh-filexfer-00.txt
494.%D January 2001
495.%O work in progress material
496.Re