diff options
Diffstat (limited to 'sftp.1')
-rw-r--r-- | sftp.1 | 93 |
1 files changed, 36 insertions, 57 deletions
@@ -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 |
58 | is an interactive file transfer program, similar to | 55 | is an interactive file transfer program, similar to |
@@ -71,17 +68,8 @@ The second usage format will retrieve files automatically if a non-interactive | |||
71 | authentication method is used; otherwise it will do so after | 68 | authentication method is used; otherwise it will do so after |
72 | successful interactive authentication. | 69 | successful interactive authentication. |
73 | .Pp | 70 | .Pp |
74 | The third usage format allows the sftp client to start in a remote directory. | 71 | The last usage format allows the sftp client to start in a remote directory. |
75 | .Pp | 72 | .Pp |
76 | The final usage format allows for automated sessions using the | ||
77 | .Fl b | ||
78 | option. | ||
79 | In such cases, it is usually necessary to configure public key authentication | ||
80 | to obviate the need to enter a password at connection time (see | ||
81 | .Xr sshd 8 | ||
82 | and | ||
83 | .Xr ssh-keygen 1 | ||
84 | for details). | ||
85 | The options are as follows: | 73 | The 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 . |
102 | Termination on error can be suppressed on a command by command basis by | 90 | Termination on error can be suppressed on a command by command basis by |
103 | prefixing the command with a | 91 | prefixing the command with a |
104 | .Sq Ic \- | 92 | .Ic '-' |
105 | character (for example, | 93 | character (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 |
108 | Can be used to pass options to | 97 | Can be used to pass options to |
109 | .Nm ssh | 98 | .Nm ssh |
@@ -112,27 +101,22 @@ in the format used in | |||
112 | This is useful for specifying options | 101 | This is useful for specifying options |
113 | for which there is no separate | 102 | for which there is no separate |
114 | .Nm sftp | 103 | .Nm sftp |
115 | command-line flag. | 104 | command-line flag. For example, to specify an alternate |
116 | For example, to specify an alternate port use: | 105 | port 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 |
119 | Specifies the SSH2 subsystem or the path for an sftp server | 108 | Specifies the SSH2 subsystem or the path for an sftp server |
120 | on the remote host. | 109 | on the remote host. A path is useful for using sftp over |
121 | A path is useful for using | 110 | protocol version 1, or when the remote |
122 | .Nm | 111 | .Nm sshd |
123 | over protocol version 1, or when the remote | ||
124 | .Xr sshd 8 | ||
125 | does not have an sftp subsystem configured. | 112 | does not have an sftp subsystem configured. |
126 | .It Fl v | 113 | .It Fl v |
127 | Raise logging level. | 114 | Raise logging level. This option is also passed to ssh. |
128 | This option is also passed to ssh. | ||
129 | .It Fl B Ar buffer_size | 115 | .It Fl B Ar buffer_size |
130 | Specify the size of the buffer that | 116 | Specify the size of the buffer that |
131 | .Nm | 117 | .Nm |
132 | uses when transferring files. | 118 | uses when transferring files. Larger buffers require fewer round trips at |
133 | Larger buffers require fewer round trips at the cost of higher | 119 | the cost of higher memory consumption. The default is 32768 bytes. |
134 | memory consumption. | ||
135 | The default is 32768 bytes. | ||
136 | .It Fl C | 120 | .It Fl C |
137 | Enables compression (via ssh's | 121 | Enables 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 |
141 | Specifies an alternative | 125 | Specifies an alternative |
142 | per-user configuration file for | 126 | per-user configuration file for |
143 | .Xr ssh 1 . | 127 | .Nm ssh . |
144 | This option is directly passed to | 128 | This 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 |
147 | Connect directly to a local sftp server | 131 | Connect directly to a local |
132 | .Nm sftp-server | ||
148 | (rather than via | 133 | (rather than via |
149 | .Xr ssh 1 ) | 134 | .Nm ssh ) |
150 | This option may be useful in debugging the client and server. | 135 | This option may be useful in debugging the client and server. |
151 | .It Fl R Ar num_requests | 136 | .It Fl R Ar num_requests |
152 | Specify how many requests may be outstanding at any one time. | 137 | Specify how many requests may be outstanding at any one time. Increasing |
153 | Increasing this may slightly improve file transfer speed | 138 | this may slightly improve file transfer speed but will increase memory |
154 | but will increase memory usage. | 139 | usage. The default is 16 outstanding requests. |
155 | The default is 16 outstanding requests. | ||
156 | .It Fl S Ar program | 140 | .It Fl S Ar program |
157 | Name of the | 141 | Name 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 | |||
172 | contain spaces. | 156 | contain spaces. |
173 | .Bl -tag -width Ds | 157 | .Bl -tag -width Ds |
174 | .It Ic bye | 158 | .It Ic bye |
175 | Quit | 159 | Quit sftp. |
176 | .Nm sftp . | ||
177 | .It Ic cd Ar path | 160 | .It Ic cd Ar path |
178 | Change remote directory to | 161 | Change remote directory to |
179 | .Ar path . | 162 | .Ar path . |
@@ -200,8 +183,7 @@ to | |||
200 | .Ar own | 183 | .Ar own |
201 | must be a numeric UID. | 184 | must be a numeric UID. |
202 | .It Ic exit | 185 | .It Ic exit |
203 | Quit | 186 | Quit 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 | |||
212 | and store it on the local machine. | 194 | and store it on the local machine. |
213 | If the local | 195 | If the local |
214 | path name is not specified, it is given the same name it has on the | 196 | path name is not specified, it is given the same name it has on the |
215 | remote machine. | 197 | remote machine. If the |
216 | If the | ||
217 | .Fl P | 198 | .Fl P |
218 | flag is specified, then the file's full permission and access time are | 199 | flag is specified, then the file's full permission and access time are |
219 | copied too. | 200 | copied too. |
@@ -243,8 +224,7 @@ Display remote directory listing of either | |||
243 | .Ar path | 224 | .Ar path |
244 | or current directory if | 225 | or current directory if |
245 | .Ar path | 226 | .Ar path |
246 | is not specified. | 227 | is not specified. If the |
247 | If the | ||
248 | .Fl l | 228 | .Fl l |
249 | flag is specified, then display additional details including permissions | 229 | flag is specified, then display additional details including permissions |
250 | and ownership information. | 230 | and ownership information. |
@@ -263,18 +243,15 @@ Toggle display of progress meter. | |||
263 | .Xc | 243 | .Xc |
264 | Upload | 244 | Upload |
265 | .Ar local-path | 245 | .Ar local-path |
266 | and store it on the remote machine. | 246 | and store it on the remote machine. If the remote path name is not |
267 | If the remote path name is not specified, it is given the same name it has | 247 | specified, it is given the same name it has on the local machine. If the |
268 | on the local machine. | ||
269 | If the | ||
270 | .Fl P | 248 | .Fl P |
271 | flag is specified, then the file's full permission and access time are | 249 | flag is specified, then the file's full permission and access time are |
272 | copied too. | 250 | copied too. |
273 | .It Ic pwd | 251 | .It Ic pwd |
274 | Display remote working directory. | 252 | Display remote working directory. |
275 | .It Ic quit | 253 | .It Ic quit |
276 | Quit | 254 | Quit sftp. |
277 | .Nm sftp . | ||
278 | .It Ic rename Ar oldpath Ar newpath | 255 | .It Ic rename Ar oldpath Ar newpath |
279 | Rename remote file from | 256 | Rename remote file from |
280 | .Ar oldpath | 257 | .Ar oldpath |
@@ -295,15 +272,17 @@ to | |||
295 | Display the | 272 | Display the |
296 | .Nm | 273 | .Nm |
297 | protocol version. | 274 | protocol version. |
298 | .It Ic \&! Ar command | 275 | .It Ic ! Ar command |
299 | Execute | 276 | Execute |
300 | .Ar command | 277 | .Ar command |
301 | in local shell. | 278 | in local shell. |
302 | .It Ic \&! | 279 | .It Ic ! |
303 | Escape to local shell. | 280 | Escape to local shell. |
304 | .It Ic \&? | 281 | .It Ic ? |
305 | Synonym for help. | 282 | Synonym for help. |
306 | .El | 283 | .El |
284 | .Sh AUTHORS | ||
285 | Damien 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 , |