version 1.110, 2017/05/03 21:49:18 |
version 1.111, 2017/10/21 23:06:24 |
|
|
.Op Fl R Ar num_requests |
.Op Fl R Ar num_requests |
.Op Fl S Ar program |
.Op Fl S Ar program |
.Op Fl s Ar subsystem | sftp_server |
.Op Fl s Ar subsystem | sftp_server |
.Ar host |
.Ar destination |
.Ek |
|
.Nm sftp |
|
.Oo Ar user Ns @ Oc Ns |
|
.Ar host Ns Op : Ns Ar |
|
.Nm sftp |
|
.Oo |
|
.Ar user Ns @ Oc Ns |
|
.Ar host Ns Oo : Ns Ar dir Ns |
|
.Op Ar / |
|
.Oc |
|
.Nm sftp |
|
.Fl b Ar batchfile |
|
.Oo Ar user Ns @ Oc Ns Ar host |
|
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm |
.Nm |
is an interactive file transfer program, similar to |
is a file transfer program, similar to |
.Xr ftp 1 , |
.Xr ftp 1 , |
which performs all operations over an encrypted |
which performs all operations over an encrypted |
.Xr ssh 1 |
.Xr ssh 1 |
transport. |
transport. |
It may also use many features of ssh, such as public key authentication and |
It may also use many features of ssh, such as public key authentication and |
compression. |
compression. |
.Nm |
|
connects and logs into the specified |
|
.Ar host , |
|
then enters an interactive command mode. |
|
.Pp |
.Pp |
The second usage format will retrieve files automatically if a non-interactive |
The |
|
.Ar destination |
|
may be specified either as |
|
.Oo Ar user Ns @ Oc Ns Ar host Ns Oo : Ns Ar path Oc |
|
or as an sftp URI in the form |
|
.No sftp:// Ns Oo Ar user Ns @ Oc Ns Ar host Ns |
|
.Oo : Ns Ar port Oc Ns Oo / Ns Ar path Oc . |
|
.Pp |
|
If the |
|
.Ar destination |
|
includes a |
|
.Ar path |
|
and it is not a directory, |
|
.Nm |
|
will retrieve files automatically if a non-interactive |
authentication method is used; otherwise it will do so after |
authentication method is used; otherwise it will do so after |
successful interactive authentication. |
successful interactive authentication. |
.Pp |
.Pp |
The third usage format allows |
If no |
|
.Ar path |
|
is specified, or if the |
|
.Ar path |
|
is a directory, |
.Nm |
.Nm |
to start in a remote directory. |
will log in to the specified |
|
.Ar host |
|
and enter interactive command mode, changing to the remote directory |
|
if one was specified. |
|
An optional trailing slash can be used to force the |
|
.Ar path |
|
to be interpreted as a directory. |
.Pp |
.Pp |
The final usage format allows for automated sessions using the |
Since the destination formats use colon characters to delimit host |
.Fl b |
names from path names or port numbers, IPv6 addresses must be |
option. |
enclosed in square brackets to avoid ambiguity. |
In such cases, it is necessary to configure non-interactive authentication |
|
to obviate the need to enter a password at connection time (see |
|
.Xr sshd 8 |
|
and |
|
.Xr ssh-keygen 1 |
|
for details). |
|
.Pp |
.Pp |
Since some usage formats use colon characters to delimit host names from path |
|
names, IPv6 addresses must be enclosed in square brackets to avoid ambiguity. |
|
.Pp |
|
The options are as follows: |
The options are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl 4 |
.It Fl 4 |
|
|
instead of |
instead of |
.Em stdin . |
.Em stdin . |
Since it lacks user interaction it should be used in conjunction with |
Since it lacks user interaction it should be used in conjunction with |
non-interactive authentication. |
non-interactive authentication to obviate the need to enter a password |
|
at connection time (see |
|
.Xr sshd 8 |
|
and |
|
.Xr ssh-keygen 1 |
|
for details). |
A |
A |
.Ar batchfile |
.Ar batchfile |
of |
of |