[BACK]Return to sftp.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Annotation of src/usr.bin/ssh/sftp.1, Revision 1.25

1.25    ! stevesk     1: .\" $OpenBSD: sftp.1,v 1.24 2001/09/05 06:23:07 deraadt Exp $
1.1       djm         2: .\"
1.9       deraadt     3: .\" Copyright (c) 2001 Damien Miller.  All rights reserved.
1.1       djm         4: .\"
                      5: .\" Redistribution and use in source and binary forms, with or without
                      6: .\" modification, are permitted provided that the following conditions
                      7: .\" are met:
                      8: .\" 1. Redistributions of source code must retain the above copyright
                      9: .\"    notice, this list of conditions and the following disclaimer.
                     10: .\" 2. Redistributions in binary form must reproduce the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer in the
                     12: .\"    documentation and/or other materials provided with the distribution.
                     13: .\"
                     14: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     15: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     16: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     17: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     18: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     19: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     20: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     21: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     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.
                     24: .\"
1.14      stevesk    25: .Dd February 4, 2001
1.1       djm        26: .Dt SFTP 1
                     27: .Os
                     28: .Sh NAME
                     29: .Nm sftp
1.8       reinhard   30: .Nd Secure file transfer program
1.1       djm        31: .Sh SYNOPSIS
                     32: .Nm sftp
1.3       deraadt    33: .Op Fl vC
1.10      deraadt    34: .Op Fl b Ar batchfile
1.25    ! stevesk    35: .Op Fl F Ar ssh_config
1.1       djm        36: .Op Fl o Ar ssh_option
1.15      mouring    37: .Op Ar host
                     38: .Nm sftp
                     39: .Op [\fIuser\fR@]\fIhost\fR[:\fIfile\fR [\fIfile\fR]]
                     40: .Nm sftp
1.21      itojun     41: .Op [\fIuser\fR@]\fIhost\fR[:\fIdir\fR[\fI/\fR]]
1.1       djm        42: .Sh DESCRIPTION
                     43: .Nm
                     44: is an interactive file transfer program, similar to
                     45: .Xr ftp 1 ,
                     46: which performs all operations over an encrypted
                     47: .Xr ssh 1
                     48: transport.
                     49: It may also use many features of ssh, such as public key authentication and
                     50: compression.
                     51: .Nm
                     52: connects and logs into the specified
1.18      stevesk    53: .Ar host ,
1.1       djm        54: then enters an interactive command mode.
1.15      mouring    55: .Pp
1.21      itojun     56: The second usage format will retrieve files automatically if a non-interactive
1.18      stevesk    57: authentication method is used; otherwise it will do so after
                     58: successful interactive authentication.
1.15      mouring    59: .Pp
                     60: The last usage format allows the sftp client to start in a remote directory.
1.1       djm        61: .Pp
                     62: The options are as follows:
                     63: .Bl -tag -width Ds
1.10      deraadt    64: .It Fl b Ar batchfile
                     65: Batch mode reads a series of commands from an input
1.13      stevesk    66: .Ar batchfile
1.10      deraadt    67: instead of
1.13      stevesk    68: .Em stdin .
                     69: Since it lacks user interaction it should be used in conjunction with
                     70: non-interactive authentication.
                     71: .Nm
1.21      itojun     72: will abort if any of the following
                     73: commands fail:
1.13      stevesk    74: .Ic get , put , rename , ln , rm , mkdir , chdir , lchdir
1.10      deraadt    75: and
1.13      stevesk    76: .Ic lmkdir .
1.11      deraadt    77: .It Fl C
1.21      itojun     78: Enables compression (via ssh's
1.11      deraadt    79: .Fl C
                     80: flag)
1.25    ! stevesk    81: .It Fl F Ar ssh_config
        !            82: Specifies an alternative
        !            83: per-user configuration file for
        !            84: .Nm ssh .
        !            85: This option is directly passed to
        !            86: .Xr ssh 1 .
1.1       djm        87: .It Fl o Ar ssh_option
1.23      stevesk    88: Can be used to pass options to
                     89: .Nm ssh
                     90: in the format used in the
                     91: .Xr ssh 1
                     92: configuration file. This is useful for specifying options
                     93: for which there is no separate
                     94: .Nm sftp
1.24      deraadt    95: command-line flag.  For example, forcing the use of protocol
                     96: version 1 is specified using
1.23      stevesk    97: .Ic sftp -oProtocol=1 .
1.11      deraadt    98: .It Fl v
                     99: Raise logging level. This option is also passed to ssh.
1.1       djm       100: .El
                    101: .Sh INTERACTIVE COMMANDS
1.2       djm       102: Once in interactive mode,
                    103: .Nm
1.21      itojun    104: understands a set of commands similar to those of
1.1       djm       105: .Xr ftp 1 .
1.6       djm       106: Commands are case insensitive and pathnames may be enclosed in quotes if they
                    107: contain spaces.
1.1       djm       108: .Bl -tag -width Ds
1.22      markus    109: .It Ic bye
                    110: Quit sftp.
1.3       deraadt   111: .It Ic cd Ar path
1.21      itojun    112: Change remote directory to
1.3       deraadt   113: .Ar path .
                    114: .It Ic lcd Ar path
1.21      itojun    115: Change local directory to
1.3       deraadt   116: .Ar path .
                    117: .It Ic chgrp Ar grp Ar path
1.21      itojun    118: Change group of file
1.5       stevesk   119: .Ar path
                    120: to
1.1       djm       121: .Ar grp .
                    122: .Ar grp
1.5       stevesk   123: must be a numeric GID.
1.3       deraadt   124: .It Ic chmod Ar mode Ar path
1.21      itojun    125: Change permissions of file
1.5       stevesk   126: .Ar path
                    127: to
1.3       deraadt   128: .Ar mode .
                    129: .It Ic chown Ar own Ar path
1.21      itojun    130: Change owner of file
1.5       stevesk   131: .Ar path
                    132: to
1.1       djm       133: .Ar own .
                    134: .Ar own
                    135: must be a numeric UID.
1.11      deraadt   136: .It Ic exit
                    137: Quit sftp.
1.7       djm       138: .It Xo Ic get
                    139: .Op Ar flags
                    140: .Ar remote-path
                    141: .Op Ar local-path
                    142: .Xc
1.1       djm       143: Retrieve the
1.5       stevesk   144: .Ar remote-path
1.1       djm       145: and store it on the local machine.
                    146: If the local
1.21      itojun    147: path name is not specified, it is given the same name it has on the
                    148: remote machine. If the
1.7       djm       149: .Fl P
                    150: flag is specified, then the file's full permission and access time are
                    151: copied too.
1.11      deraadt   152: .It Ic help
                    153: Display help text.
1.3       deraadt   154: .It Ic lls Op Ar ls-options Op Ar path
1.21      itojun    155: Display local directory listing of either
1.1       djm       156: .Ar path
                    157: or current directory if
                    158: .Ar path
1.5       stevesk   159: is not specified.
1.3       deraadt   160: .It Ic lmkdir Ar path
1.1       djm       161: Create local directory specified by
1.3       deraadt   162: .Ar path .
1.12      djm       163: .It Ic ln Ar oldpath Ar newpath
1.21      itojun    164: Create a symbolic link from
1.12      djm       165: .Ar oldpath
                    166: to
                    167: .Ar newpath .
1.3       deraadt   168: .It Ic lpwd
                    169: Print local working directory.
                    170: .It Ic ls Op Ar path
1.1       djm       171: Display remote directory listing of either
                    172: .Ar path
1.5       stevesk   173: or current directory if
                    174: .Ar path
                    175: is not specified.
1.3       deraadt   176: .It Ic lumask Ar umask
1.21      itojun    177: Set local umask to
1.3       deraadt   178: .Ar umask .
                    179: .It Ic mkdir Ar path
1.1       djm       180: Create remote directory specified by
1.3       deraadt   181: .Ar path .
1.7       djm       182: .It Xo Ic put
                    183: .Op Ar flags
                    184: .Ar local-path
                    185: .Op Ar local-path
                    186: .Xc
1.1       djm       187: Upload
1.5       stevesk   188: .Ar local-path
1.21      itojun    189: and store it on the remote machine. If the remote path name is not
                    190: specified, it is given the same name it has on the local machine. If the
1.7       djm       191: .Fl P
                    192: flag is specified, then the file's full permission and access time are
                    193: copied too.
1.3       deraadt   194: .It Ic pwd
                    195: Display remote working directory.
                    196: .It Ic quit
                    197: Quit sftp.
                    198: .It Ic rename Ar oldpath Ar newpath
1.1       djm       199: Rename remote file from
                    200: .Ar oldpath
                    201: to
1.3       deraadt   202: .Ar newpath .
                    203: .It Ic rmdir Ar path
1.1       djm       204: Remove remote directory specified by
1.3       deraadt   205: .Ar path .
                    206: .It Ic rm Ar path
1.1       djm       207: Delete remote file specified by
1.3       deraadt   208: .Ar path .
1.12      djm       209: .It Ic symlink Ar oldpath Ar newpath
1.21      itojun    210: Create a symbolic link from
1.12      djm       211: .Ar oldpath
                    212: to
                    213: .Ar newpath .
1.1       djm       214: .It Ic ! Ar command
1.21      itojun    215: Execute
1.1       djm       216: .Ar command
1.3       deraadt   217: in local shell.
1.1       djm       218: .It Ic !
1.3       deraadt   219: Escape to local shell.
                    220: .It Ic ?
1.5       stevesk   221: Synonym for help.
1.4       itojun    222: .El
1.1       djm       223: .Sh AUTHORS
                    224: Damien Miller <djm@mindrot.org>
                    225: .Sh SEE ALSO
1.17      markus    226: .Xr scp 1 ,
1.1       djm       227: .Xr ssh 1 ,
                    228: .Xr ssh-add 1 ,
                    229: .Xr ssh-keygen 1 ,
1.17      markus    230: .Xr sftp-server 8 ,
                    231: .Xr sshd 8
                    232: .Rs
1.20      deraadt   233: .%A T. Ylonen
                    234: .%A S. Lehtinen
1.17      markus    235: .%T "SSH File Transfer Protocol"
                    236: .%N draft-ietf-secsh-filexfer-00.txt
                    237: .%D January 2001
                    238: .%O work in progress material
                    239: .Re