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