diff options
Diffstat (limited to 'sftp.1')
-rw-r--r-- | sftp.1 | 92 |
1 files changed, 52 insertions, 40 deletions
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: sftp.1,v 1.110 2017/05/03 21:49:18 naddy Exp $ | 1 | .\" $OpenBSD: sftp.1,v 1.114 2018/02/23 07:38:09 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. | 3 | .\" Copyright (c) 2001 Damien Miller. All rights reserved. |
4 | .\" | 4 | .\" |
@@ -22,7 +22,7 @@ | |||
22 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 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. | 23 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 | .\" | 24 | .\" |
25 | .Dd $Mdocdate: May 3 2017 $ | 25 | .Dd $Mdocdate: February 23 2018 $ |
26 | .Dt SFTP 1 | 26 | .Dt SFTP 1 |
27 | .Os | 27 | .Os |
28 | .Sh NAME | 28 | .Sh NAME |
@@ -30,7 +30,6 @@ | |||
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 | ||
34 | .Op Fl 46aCfpqrv | 33 | .Op Fl 46aCfpqrv |
35 | .Op Fl B Ar buffer_size | 34 | .Op Fl B Ar buffer_size |
36 | .Op Fl b Ar batchfile | 35 | .Op Fl b Ar batchfile |
@@ -44,54 +43,55 @@ | |||
44 | .Op Fl R Ar num_requests | 43 | .Op Fl R Ar num_requests |
45 | .Op Fl S Ar program | 44 | .Op Fl S Ar program |
46 | .Op Fl s Ar subsystem | sftp_server | 45 | .Op Fl s Ar subsystem | sftp_server |
47 | .Ar host | 46 | .Ar destination |
48 | .Ek | ||
49 | .Nm sftp | ||
50 | .Oo Ar user Ns @ Oc Ns | ||
51 | .Ar host Ns Op : Ns Ar | ||
52 | .Nm sftp | ||
53 | .Oo | ||
54 | .Ar user Ns @ Oc Ns | ||
55 | .Ar host Ns Oo : Ns Ar dir Ns | ||
56 | .Op Ar / | ||
57 | .Oc | ||
58 | .Nm sftp | ||
59 | .Fl b Ar batchfile | ||
60 | .Oo Ar user Ns @ Oc Ns Ar host | ||
61 | .Sh DESCRIPTION | 47 | .Sh DESCRIPTION |
62 | .Nm | 48 | .Nm |
63 | is an interactive file transfer program, similar to | 49 | is a file transfer program, similar to |
64 | .Xr ftp 1 , | 50 | .Xr ftp 1 , |
65 | which performs all operations over an encrypted | 51 | which performs all operations over an encrypted |
66 | .Xr ssh 1 | 52 | .Xr ssh 1 |
67 | transport. | 53 | transport. |
68 | It may also use many features of ssh, such as public key authentication and | 54 | It may also use many features of ssh, such as public key authentication and |
69 | compression. | 55 | compression. |
70 | .Nm | ||
71 | connects and logs into the specified | ||
72 | .Ar host , | ||
73 | then enters an interactive command mode. | ||
74 | .Pp | 56 | .Pp |
75 | The second usage format will retrieve files automatically if a non-interactive | 57 | The |
58 | .Ar destination | ||
59 | may be specified either as | ||
60 | .Sm off | ||
61 | .Oo user @ Oc host Op : path | ||
62 | .Sm on | ||
63 | or as a URI in the form | ||
64 | .Sm off | ||
65 | .No sftp:// Oo user @ Oc host Oo : port Oc Op / path . | ||
66 | .Sm on | ||
67 | .Pp | ||
68 | If the | ||
69 | .Ar destination | ||
70 | includes a | ||
71 | .Ar path | ||
72 | and it is not a directory, | ||
73 | .Nm | ||
74 | will retrieve files automatically if a non-interactive | ||
76 | authentication method is used; otherwise it will do so after | 75 | authentication method is used; otherwise it will do so after |
77 | successful interactive authentication. | 76 | successful interactive authentication. |
78 | .Pp | 77 | .Pp |
79 | The third usage format allows | 78 | If no |
79 | .Ar path | ||
80 | is specified, or if the | ||
81 | .Ar path | ||
82 | is a directory, | ||
80 | .Nm | 83 | .Nm |
81 | to start in a remote directory. | 84 | will log in to the specified |
82 | .Pp | 85 | .Ar host |
83 | The final usage format allows for automated sessions using the | 86 | and enter interactive command mode, changing to the remote directory |
84 | .Fl b | 87 | if one was specified. |
85 | option. | 88 | An optional trailing slash can be used to force the |
86 | In such cases, it is necessary to configure non-interactive authentication | 89 | .Ar path |
87 | to obviate the need to enter a password at connection time (see | 90 | to be interpreted as a directory. |
88 | .Xr sshd 8 | ||
89 | and | ||
90 | .Xr ssh-keygen 1 | ||
91 | for details). | ||
92 | .Pp | 91 | .Pp |
93 | Since some usage formats use colon characters to delimit host names from path | 92 | Since the destination formats use colon characters to delimit host |
94 | names, IPv6 addresses must be enclosed in square brackets to avoid ambiguity. | 93 | names from path names or port numbers, IPv6 addresses must be |
94 | enclosed in square brackets to avoid ambiguity. | ||
95 | .Pp | 95 | .Pp |
96 | The options are as follows: | 96 | The options are as follows: |
97 | .Bl -tag -width Ds | 97 | .Bl -tag -width Ds |
@@ -121,7 +121,12 @@ Batch mode reads a series of commands from an input | |||
121 | instead of | 121 | instead of |
122 | .Em stdin . | 122 | .Em stdin . |
123 | Since it lacks user interaction it should be used in conjunction with | 123 | Since it lacks user interaction it should be used in conjunction with |
124 | non-interactive authentication. | 124 | non-interactive authentication to obviate the need to enter a password |
125 | at connection time (see | ||
126 | .Xr sshd 8 | ||
127 | and | ||
128 | .Xr ssh-keygen 1 | ||
129 | for details). | ||
125 | A | 130 | A |
126 | .Ar batchfile | 131 | .Ar batchfile |
127 | of | 132 | of |
@@ -189,6 +194,7 @@ For full details of the options listed below, and their possible values, see | |||
189 | .It AddressFamily | 194 | .It AddressFamily |
190 | .It BatchMode | 195 | .It BatchMode |
191 | .It BindAddress | 196 | .It BindAddress |
197 | .It BindInterface | ||
192 | .It CanonicalDomains | 198 | .It CanonicalDomains |
193 | .It CanonicalizeFallbackLocal | 199 | .It CanonicalizeFallbackLocal |
194 | .It CanonicalizeHostname | 200 | .It CanonicalizeHostname |
@@ -296,9 +302,12 @@ must be escaped with backslashes | |||
296 | .It Ic bye | 302 | .It Ic bye |
297 | Quit | 303 | Quit |
298 | .Nm sftp . | 304 | .Nm sftp . |
299 | .It Ic cd Ar path | 305 | .It Ic cd Op Ar path |
300 | Change remote directory to | 306 | Change remote directory to |
301 | .Ar path . | 307 | .Ar path . |
308 | If | ||
309 | .Ar path | ||
310 | is not specified, then change directory to the one the session started in. | ||
302 | .It Ic chgrp Ar grp Ar path | 311 | .It Ic chgrp Ar grp Ar path |
303 | Change group of file | 312 | Change group of file |
304 | .Ar path | 313 | .Ar path |
@@ -402,9 +411,12 @@ Note that | |||
402 | does not follow symbolic links when performing recursive transfers. | 411 | does not follow symbolic links when performing recursive transfers. |
403 | .It Ic help | 412 | .It Ic help |
404 | Display help text. | 413 | Display help text. |
405 | .It Ic lcd Ar path | 414 | .It Ic lcd Op Ar path |
406 | Change local directory to | 415 | Change local directory to |
407 | .Ar path . | 416 | .Ar path . |
417 | If | ||
418 | .Ar path | ||
419 | is not specified, then change directory to the local user's home directory. | ||
408 | .It Ic lls Op Ar ls-options Op Ar path | 420 | .It Ic lls Op Ar ls-options Op Ar path |
409 | Display local directory listing of either | 421 | Display local directory listing of either |
410 | .Ar path | 422 | .Ar path |