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