summaryrefslogtreecommitdiff
path: root/sftp.1
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.1')
-rw-r--r--sftp.193
1 files changed, 36 insertions, 57 deletions
diff --git a/sftp.1 b/sftp.1
index 753a4f2b9..02d2c274b 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.45 2003/09/02 18:50:06 jmc Exp $ 1.\" $OpenBSD: sftp.1,v 1.41 2003/03/28 10:11:43 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -27,7 +27,7 @@
27.Os 27.Os
28.Sh NAME 28.Sh NAME
29.Nm sftp 29.Nm sftp
30.Nd secure file transfer program 30.Nd Secure file transfer program
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm sftp 32.Nm sftp
33.Bk -words 33.Bk -words
@@ -43,16 +43,13 @@
43.Ar host 43.Ar host
44.Ek 44.Ek
45.Nm sftp 45.Nm sftp
46.Oo Oo Ar user Ns @ Oc Ns 46.Oo Oo Ar user Ns No @ Oc Ns
47.Ar host Ns Oo : Ns Ar file Oo 47.Ar host Ns Oo : Ns Ar file Oo
48.Ar file Oc Oc Oc 48.Ar file Oc Oc Oc
49.Nm sftp 49.Nm sftp
50.Oo Oo Ar user Ns @ Oc Ns 50.Oo Oo Ar user Ns No @ Oc Ns
51.Ar host Ns Oo : Ns Ar dir Ns 51.Ar host Ns Oo : Ns Ar dir Ns
52.Oo Ar / Oc Oc Oc 52.Oo Ar / Oc Oc Oc
53.Nm sftp
54.Fl b Ar batchfile
55.Oo Ar user Ns @ Oc Ns Ar host
56.Sh DESCRIPTION 53.Sh DESCRIPTION
57.Nm 54.Nm
58is an interactive file transfer program, similar to 55is an interactive file transfer program, similar to
@@ -71,17 +68,8 @@ The second usage format will retrieve files automatically if a non-interactive
71authentication method is used; otherwise it will do so after 68authentication method is used; otherwise it will do so after
72successful interactive authentication. 69successful interactive authentication.
73.Pp 70.Pp
74The third usage format allows the sftp client to start in a remote directory. 71The last usage format allows the sftp client to start in a remote directory.
75.Pp 72.Pp
76The final usage format allows for automated sessions using the
77.Fl b
78option.
79In such cases, it is usually necessary to configure public key authentication
80to obviate the need to enter a password at connection time (see
81.Xr sshd 8
82and
83.Xr ssh-keygen 1
84for details).
85The options are as follows: 73The options are as follows:
86.Bl -tag -width Ds 74.Bl -tag -width Ds
87.It Fl b Ar batchfile 75.It Fl b Ar batchfile
@@ -101,9 +89,10 @@ and
101.Ic lmkdir . 89.Ic lmkdir .
102Termination on error can be suppressed on a command by command basis by 90Termination on error can be suppressed on a command by command basis by
103prefixing the command with a 91prefixing the command with a
104.Sq Ic \- 92.Ic '-'
105character (for example, 93character (For example,
106.Ic -rm /tmp/blah* ) . 94.Ic -rm /tmp/blah*
95).
107.It Fl o Ar ssh_option 96.It Fl o Ar ssh_option
108Can be used to pass options to 97Can be used to pass options to
109.Nm ssh 98.Nm ssh
@@ -112,27 +101,22 @@ in the format used in
112This is useful for specifying options 101This is useful for specifying options
113for which there is no separate 102for which there is no separate
114.Nm sftp 103.Nm sftp
115command-line flag. 104command-line flag. For example, to specify an alternate
116For example, to specify an alternate port use: 105port use:
117.Ic sftp -oPort=24 . 106.Ic sftp -oPort=24 .
118.It Fl s Ar subsystem | sftp_server 107.It Fl s Ar subsystem | sftp_server
119Specifies the SSH2 subsystem or the path for an sftp server 108Specifies the SSH2 subsystem or the path for an sftp server
120on the remote host. 109on the remote host. A path is useful for using sftp over
121A path is useful for using 110protocol version 1, or when the remote
122.Nm 111.Nm sshd
123over protocol version 1, or when the remote
124.Xr sshd 8
125does not have an sftp subsystem configured. 112does not have an sftp subsystem configured.
126.It Fl v 113.It Fl v
127Raise logging level. 114Raise logging level. This option is also passed to ssh.
128This option is also passed to ssh.
129.It Fl B Ar buffer_size 115.It Fl B Ar buffer_size
130Specify the size of the buffer that 116Specify the size of the buffer that
131.Nm 117.Nm
132uses when transferring files. 118uses when transferring files. Larger buffers require fewer round trips at
133Larger buffers require fewer round trips at the cost of higher 119the cost of higher memory consumption. The default is 32768 bytes.
134memory consumption.
135The default is 32768 bytes.
136.It Fl C 120.It Fl C
137Enables compression (via ssh's 121Enables compression (via ssh's
138.Fl C 122.Fl C
@@ -140,19 +124,19 @@ flag).
140.It Fl F Ar ssh_config 124.It Fl F Ar ssh_config
141Specifies an alternative 125Specifies an alternative
142per-user configuration file for 126per-user configuration file for
143.Xr ssh 1 . 127.Nm ssh .
144This option is directly passed to 128This option is directly passed to
145.Xr ssh 1 . 129.Xr ssh 1 .
146.It Fl P Ar sftp_server path 130.It Fl P Ar sftp_server path
147Connect directly to a local sftp server 131Connect directly to a local
132.Nm sftp-server
148(rather than via 133(rather than via
149.Xr ssh 1 ) 134.Nm ssh )
150This option may be useful in debugging the client and server. 135This option may be useful in debugging the client and server.
151.It Fl R Ar num_requests 136.It Fl R Ar num_requests
152Specify how many requests may be outstanding at any one time. 137Specify how many requests may be outstanding at any one time. Increasing
153Increasing this may slightly improve file transfer speed 138this may slightly improve file transfer speed but will increase memory
154but will increase memory usage. 139usage. The default is 16 outstanding requests.
155The default is 16 outstanding requests.
156.It Fl S Ar program 140.It Fl S Ar program
157Name of the 141Name of the
158.Ar program 142.Ar program
@@ -172,8 +156,7 @@ Commands are case insensitive and pathnames may be enclosed in quotes if they
172contain spaces. 156contain spaces.
173.Bl -tag -width Ds 157.Bl -tag -width Ds
174.It Ic bye 158.It Ic bye
175Quit 159Quit sftp.
176.Nm sftp .
177.It Ic cd Ar path 160.It Ic cd Ar path
178Change remote directory to 161Change remote directory to
179.Ar path . 162.Ar path .
@@ -200,8 +183,7 @@ to
200.Ar own 183.Ar own
201must be a numeric UID. 184must be a numeric UID.
202.It Ic exit 185.It Ic exit
203Quit 186Quit sftp.
204.Nm sftp .
205.It Xo Ic get 187.It Xo Ic get
206.Op Ar flags 188.Op Ar flags
207.Ar remote-path 189.Ar remote-path
@@ -212,8 +194,7 @@ Retrieve the
212and store it on the local machine. 194and store it on the local machine.
213If the local 195If the local
214path name is not specified, it is given the same name it has on the 196path name is not specified, it is given the same name it has on the
215remote machine. 197remote machine. If the
216If the
217.Fl P 198.Fl P
218flag is specified, then the file's full permission and access time are 199flag is specified, then the file's full permission and access time are
219copied too. 200copied too.
@@ -243,8 +224,7 @@ Display remote directory listing of either
243.Ar path 224.Ar path
244or current directory if 225or current directory if
245.Ar path 226.Ar path
246is not specified. 227is not specified. If the
247If the
248.Fl l 228.Fl l
249flag is specified, then display additional details including permissions 229flag is specified, then display additional details including permissions
250and ownership information. 230and ownership information.
@@ -263,18 +243,15 @@ Toggle display of progress meter.
263.Xc 243.Xc
264Upload 244Upload
265.Ar local-path 245.Ar local-path
266and store it on the remote machine. 246and store it on the remote machine. If the remote path name is not
267If the remote path name is not specified, it is given the same name it has 247specified, it is given the same name it has on the local machine. If the
268on the local machine.
269If the
270.Fl P 248.Fl P
271flag is specified, then the file's full permission and access time are 249flag is specified, then the file's full permission and access time are
272copied too. 250copied too.
273.It Ic pwd 251.It Ic pwd
274Display remote working directory. 252Display remote working directory.
275.It Ic quit 253.It Ic quit
276Quit 254Quit sftp.
277.Nm sftp .
278.It Ic rename Ar oldpath Ar newpath 255.It Ic rename Ar oldpath Ar newpath
279Rename remote file from 256Rename remote file from
280.Ar oldpath 257.Ar oldpath
@@ -295,15 +272,17 @@ to
295Display the 272Display the
296.Nm 273.Nm
297protocol version. 274protocol version.
298.It Ic \&! Ar command 275.It Ic ! Ar command
299Execute 276Execute
300.Ar command 277.Ar command
301in local shell. 278in local shell.
302.It Ic \&! 279.It Ic !
303Escape to local shell. 280Escape to local shell.
304.It Ic \&? 281.It Ic ?
305Synonym for help. 282Synonym for help.
306.El 283.El
284.Sh AUTHORS
285Damien Miller <djm@mindrot.org>
307.Sh SEE ALSO 286.Sh SEE ALSO
308.Xr scp 1 , 287.Xr scp 1 ,
309.Xr ssh 1 , 288.Xr ssh 1 ,