summaryrefslogtreecommitdiff
path: root/sftp.1
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.1')
-rw-r--r--sftp.192
1 files changed, 52 insertions, 40 deletions
diff --git a/sftp.1 b/sftp.1
index c218376fb..43e0442f7 100644
--- a/sftp.1
+++ b/sftp.1
@@ -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
63is an interactive file transfer program, similar to 49is a file transfer program, similar to
64.Xr ftp 1 , 50.Xr ftp 1 ,
65which performs all operations over an encrypted 51which performs all operations over an encrypted
66.Xr ssh 1 52.Xr ssh 1
67transport. 53transport.
68It may also use many features of ssh, such as public key authentication and 54It may also use many features of ssh, such as public key authentication and
69compression. 55compression.
70.Nm
71connects and logs into the specified
72.Ar host ,
73then enters an interactive command mode.
74.Pp 56.Pp
75The second usage format will retrieve files automatically if a non-interactive 57The
58.Ar destination
59may be specified either as
60.Sm off
61.Oo user @ Oc host Op : path
62.Sm on
63or 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
68If the
69.Ar destination
70includes a
71.Ar path
72and it is not a directory,
73.Nm
74will retrieve files automatically if a non-interactive
76authentication method is used; otherwise it will do so after 75authentication method is used; otherwise it will do so after
77successful interactive authentication. 76successful interactive authentication.
78.Pp 77.Pp
79The third usage format allows 78If no
79.Ar path
80is specified, or if the
81.Ar path
82is a directory,
80.Nm 83.Nm
81to start in a remote directory. 84will log in to the specified
82.Pp 85.Ar host
83The final usage format allows for automated sessions using the 86and enter interactive command mode, changing to the remote directory
84.Fl b 87if one was specified.
85option. 88An optional trailing slash can be used to force the
86In such cases, it is necessary to configure non-interactive authentication 89.Ar path
87to obviate the need to enter a password at connection time (see 90to be interpreted as a directory.
88.Xr sshd 8
89and
90.Xr ssh-keygen 1
91for details).
92.Pp 91.Pp
93Since some usage formats use colon characters to delimit host names from path 92Since the destination formats use colon characters to delimit host
94names, IPv6 addresses must be enclosed in square brackets to avoid ambiguity. 93names from path names or port numbers, IPv6 addresses must be
94enclosed in square brackets to avoid ambiguity.
95.Pp 95.Pp
96The options are as follows: 96The 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
121instead of 121instead of
122.Em stdin . 122.Em stdin .
123Since it lacks user interaction it should be used in conjunction with 123Since it lacks user interaction it should be used in conjunction with
124non-interactive authentication. 124non-interactive authentication to obviate the need to enter a password
125at connection time (see
126.Xr sshd 8
127and
128.Xr ssh-keygen 1
129for details).
125A 130A
126.Ar batchfile 131.Ar batchfile
127of 132of
@@ -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
297Quit 303Quit
298.Nm sftp . 304.Nm sftp .
299.It Ic cd Ar path 305.It Ic cd Op Ar path
300Change remote directory to 306Change remote directory to
301.Ar path . 307.Ar path .
308If
309.Ar path
310is 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
303Change group of file 312Change group of file
304.Ar path 313.Ar path
@@ -402,9 +411,12 @@ Note that
402does not follow symbolic links when performing recursive transfers. 411does not follow symbolic links when performing recursive transfers.
403.It Ic help 412.It Ic help
404Display help text. 413Display help text.
405.It Ic lcd Ar path 414.It Ic lcd Op Ar path
406Change local directory to 415Change local directory to
407.Ar path . 416.Ar path .
417If
418.Ar path
419is 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
409Display local directory listing of either 421Display local directory listing of either
410.Ar path 422.Ar path