version 1.7.2.2, 2001/02/19 17:19:25 |
version 1.7.2.3, 2001/03/21 19:46:29 |
|
|
.\" $OpenBSD$ |
.\" $OpenBSD$ |
.\" |
.\" |
.\" Copyright (c) 2001 Damien Miller. All rights reserved. |
.\" Copyright (c) 2001 Damien Miller. All rights reserved. |
.\" |
.\" |
.\" Redistribution and use in source and binary forms, with or without |
.\" Redistribution and use in source and binary forms, with or without |
.\" modification, are permitted provided that the following conditions |
.\" modification, are permitted provided that the following conditions |
|
|
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm sftp |
.Nm sftp |
.Op Fl vC |
.Op Fl vC |
|
.Op Fl b Ar batchfile |
.Op Fl o Ar ssh_option |
.Op Fl o Ar ssh_option |
.Op Ar hostname | user@hostname |
.Op Ar hostname | user@hostname |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
|
|
.Pp |
.Pp |
The options are as follows: |
The options are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl v |
.It Fl b Ar batchfile |
Raise logging level. This option is also passed to ssh. |
Batch mode reads a series of commands from an input |
|
.Ar batchfile |
|
instead of |
|
.Em stdin . |
|
Since it lacks user interaction it should be used in conjunction with |
|
non-interactive authentication. |
|
.Nm |
|
will abort if any of the following |
|
commands fail: |
|
.Ic get , put , rename , ln , rm , mkdir , chdir , lchdir |
|
and |
|
.Ic lmkdir . |
.It Fl C |
.It Fl C |
Enables compression (via ssh's |
Enables compression (via ssh's |
.Fl C |
.Fl C |
|
|
.It Fl o Ar ssh_option |
.It Fl o Ar ssh_option |
Specify an option to be directly passed to |
Specify an option to be directly passed to |
.Xr ssh 1 . |
.Xr ssh 1 . |
|
.It Fl v |
|
Raise logging level. This option is also passed to ssh. |
.El |
.El |
.Sh INTERACTIVE COMMANDS |
.Sh INTERACTIVE COMMANDS |
Once in interactive mode, |
Once in interactive mode, |
|
|
.Ar own . |
.Ar own . |
.Ar own |
.Ar own |
must be a numeric UID. |
must be a numeric UID. |
.It Ic help |
.It Ic exit |
Display help text. |
Quit sftp. |
.It Xo Ic get |
.It Xo Ic get |
.Op Ar flags |
.Op Ar flags |
.Ar remote-path |
.Ar remote-path |
|
|
.Fl P |
.Fl P |
flag is specified, then the file's full permission and access time are |
flag is specified, then the file's full permission and access time are |
copied too. |
copied too. |
|
.It Ic help |
|
Display help text. |
.It Ic lls Op Ar ls-options Op Ar path |
.It Ic lls Op Ar ls-options Op Ar path |
Display local directory listing of either |
Display local directory listing of either |
.Ar path |
.Ar path |
|
|
.It Ic lmkdir Ar path |
.It Ic lmkdir Ar path |
Create local directory specified by |
Create local directory specified by |
.Ar path . |
.Ar path . |
|
.It Ic ln Ar oldpath Ar newpath |
|
Create a symbolic link from |
|
.Ar oldpath |
|
to |
|
.Ar newpath . |
.It Ic lpwd |
.It Ic lpwd |
Print local working directory. |
Print local working directory. |
.It Ic ls Op Ar path |
.It Ic ls Op Ar path |
|
|
.Xc |
.Xc |
Upload |
Upload |
.Ar local-path |
.Ar local-path |
and store it on the remote machine. If the remote path name is not specified, |
and store it on the remote machine. If the remote path name is not |
it is given the same name it has on the local machine. If the |
specified, it is given the same name it has on the local machine. If the |
.Fl P |
.Fl P |
flag is specified, then the file's full permission and access time are |
flag is specified, then the file's full permission and access time are |
copied too. |
copied too. |
.It Ic pwd |
.It Ic pwd |
Display remote working directory. |
Display remote working directory. |
.It Ic exit |
|
Quit sftp. |
|
.It Ic quit |
.It Ic quit |
Quit sftp. |
Quit sftp. |
.It Ic rename Ar oldpath Ar newpath |
.It Ic rename Ar oldpath Ar newpath |
|
|
.It Ic rm Ar path |
.It Ic rm Ar path |
Delete remote file specified by |
Delete remote file specified by |
.Ar path . |
.Ar path . |
|
.It Ic symlink Ar oldpath Ar newpath |
|
Create a symbolic link from |
|
.Ar oldpath |
|
to |
|
.Ar newpath . |
.It Ic ! Ar command |
.It Ic ! Ar command |
Execute |
Execute |
.Ar command |
.Ar command |
|
|
Damien Miller <djm@mindrot.org> |
Damien Miller <djm@mindrot.org> |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr ssh 1 , |
.Xr ssh 1 , |
|
.Xr sftp-server 8 , |
.Xr ssh-add 1 , |
.Xr ssh-add 1 , |
.Xr ssh-keygen 1 , |
.Xr ssh-keygen 1 , |
.Xr sshd 8 , |
.Xr sshd 8 , |