[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.7.2.4

1.7.2.4 ! jason       1: .\" $OpenBSD: sftp.1,v 1.17 2001/04/22 13:32:27 markus Exp $
1.1       djm         2: .\"
1.7.2.3   jason       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.7.2.4 ! jason      25: .Dd February 4, 2001
1.1       djm        26: .Dt SFTP 1
                     27: .Os
                     28: .Sh NAME
                     29: .Nm sftp
1.7.2.2   jason      30: .Nd Secure file transfer program
1.1       djm        31: .Sh SYNOPSIS
                     32: .Nm sftp
1.3       deraadt    33: .Op Fl vC
1.7.2.3   jason      34: .Op Fl b Ar batchfile
1.1       djm        35: .Op Fl o Ar ssh_option
1.7.2.4 ! jason      36: .Op Ar host
        !            37: .Nm sftp
        !            38: .Op [\fIuser\fR@]\fIhost\fR[:\fIfile\fR [\fIfile\fR]]
        !            39: .Nm sftp
        !            40: .Op [\fIuser\fR@]\fIhost\fR[:\fIdir\fR[\fI/\fR]]
1.1       djm        41: .Sh DESCRIPTION
                     42: .Nm
                     43: is an interactive file transfer program, similar to
                     44: .Xr ftp 1 ,
                     45: which performs all operations over an encrypted
                     46: .Xr ssh 1
                     47: transport.
                     48: It may also use many features of ssh, such as public key authentication and
                     49: compression.
                     50: .Nm
                     51: connects and logs into the specified
1.5       stevesk    52: .Ar hostname ,
1.1       djm        53: then enters an interactive command mode.
                     54: .Pp
1.7.2.4 ! jason      55: The second usage format will fetch files automaticly if a non-interactive
        !            56: authentication is used, else it do so after an interactive authentication
        !            57: is used.
        !            58: .Pp
        !            59: The last usage format allows the sftp client to start in a remote directory.
        !            60: .Pp
1.1       djm        61: The options are as follows:
                     62: .Bl -tag -width Ds
1.7.2.3   jason      63: .It Fl b Ar batchfile
                     64: Batch mode reads a series of commands from an input
                     65: .Ar batchfile
                     66: instead of
                     67: .Em stdin .
                     68: Since it lacks user interaction it should be used in conjunction with
                     69: non-interactive authentication.
                     70: .Nm
                     71: will abort if any of the following
                     72: commands fail:
                     73: .Ic get , put , rename , ln , rm , mkdir , chdir , lchdir
                     74: and
                     75: .Ic lmkdir .
1.1       djm        76: .It Fl C
                     77: Enables compression (via ssh's
                     78: .Fl C
                     79: flag)
                     80: .It Fl o Ar ssh_option
                     81: Specify an option to be directly passed to
                     82: .Xr ssh 1 .
1.7.2.3   jason      83: .It Fl v
                     84: Raise logging level. This option is also passed to ssh.
1.1       djm        85: .El
                     86: .Sh INTERACTIVE COMMANDS
1.2       djm        87: Once in interactive mode,
                     88: .Nm
1.1       djm        89: understands a set of commands similar to those of
                     90: .Xr ftp 1 .
1.6       djm        91: Commands are case insensitive and pathnames may be enclosed in quotes if they
                     92: contain spaces.
1.1       djm        93: .Bl -tag -width Ds
1.3       deraadt    94: .It Ic cd Ar path
1.1       djm        95: Change remote directory to
1.3       deraadt    96: .Ar path .
                     97: .It Ic lcd Ar path
1.1       djm        98: Change local directory to
1.3       deraadt    99: .Ar path .
                    100: .It Ic chgrp Ar grp Ar path
1.1       djm       101: Change group of file
1.5       stevesk   102: .Ar path
                    103: to
1.1       djm       104: .Ar grp .
                    105: .Ar grp
1.5       stevesk   106: must be a numeric GID.
1.3       deraadt   107: .It Ic chmod Ar mode Ar path
1.1       djm       108: Change permissions of file
1.5       stevesk   109: .Ar path
                    110: to
1.3       deraadt   111: .Ar mode .
                    112: .It Ic chown Ar own Ar path
1.1       djm       113: Change owner of file
1.5       stevesk   114: .Ar path
                    115: to
1.1       djm       116: .Ar own .
                    117: .Ar own
                    118: must be a numeric UID.
1.7.2.3   jason     119: .It Ic exit
                    120: Quit sftp.
1.7       djm       121: .It Xo Ic get
                    122: .Op Ar flags
                    123: .Ar remote-path
                    124: .Op Ar local-path
                    125: .Xc
1.1       djm       126: Retrieve the
1.5       stevesk   127: .Ar remote-path
1.1       djm       128: and store it on the local machine.
                    129: If the local
1.5       stevesk   130: path name is not specified, it is given the same name it has on the
1.7       djm       131: remote machine. If the
                    132: .Fl P
                    133: flag is specified, then the file's full permission and access time are
                    134: copied too.
1.7.2.3   jason     135: .It Ic help
                    136: Display help text.
1.3       deraadt   137: .It Ic lls Op Ar ls-options Op Ar path
1.1       djm       138: Display local directory listing of either
                    139: .Ar path
                    140: or current directory if
                    141: .Ar path
1.5       stevesk   142: is not specified.
1.3       deraadt   143: .It Ic lmkdir Ar path
1.1       djm       144: Create local directory specified by
1.3       deraadt   145: .Ar path .
1.7.2.3   jason     146: .It Ic ln Ar oldpath Ar newpath
                    147: Create a symbolic link from
                    148: .Ar oldpath
                    149: to
                    150: .Ar newpath .
1.3       deraadt   151: .It Ic lpwd
                    152: Print local working directory.
                    153: .It Ic ls Op Ar path
1.1       djm       154: Display remote directory listing of either
                    155: .Ar path
1.5       stevesk   156: or current directory if
                    157: .Ar path
                    158: is not specified.
1.3       deraadt   159: .It Ic lumask Ar umask
1.1       djm       160: Set local umask to
1.3       deraadt   161: .Ar umask .
                    162: .It Ic mkdir Ar path
1.1       djm       163: Create remote directory specified by
1.3       deraadt   164: .Ar path .
1.7       djm       165: .It Xo Ic put
                    166: .Op Ar flags
                    167: .Ar local-path
                    168: .Op Ar local-path
                    169: .Xc
1.1       djm       170: Upload
1.5       stevesk   171: .Ar local-path
1.7.2.3   jason     172: and store it on the remote machine. If the remote path name is not
                    173: specified, it is given the same name it has on the local machine. If the
1.7       djm       174: .Fl P
                    175: flag is specified, then the file's full permission and access time are
                    176: copied too.
1.3       deraadt   177: .It Ic pwd
                    178: Display remote working directory.
                    179: .It Ic quit
                    180: Quit sftp.
                    181: .It Ic rename Ar oldpath Ar newpath
1.1       djm       182: Rename remote file from
                    183: .Ar oldpath
                    184: to
1.3       deraadt   185: .Ar newpath .
                    186: .It Ic rmdir Ar path
1.1       djm       187: Remove remote directory specified by
1.3       deraadt   188: .Ar path .
                    189: .It Ic rm Ar path
1.1       djm       190: Delete remote file specified by
1.3       deraadt   191: .Ar path .
1.7.2.3   jason     192: .It Ic symlink Ar oldpath Ar newpath
                    193: Create a symbolic link from
                    194: .Ar oldpath
                    195: to
                    196: .Ar newpath .
1.1       djm       197: .It Ic ! Ar command
                    198: Execute
                    199: .Ar command
1.3       deraadt   200: in local shell.
1.1       djm       201: .It Ic !
1.3       deraadt   202: Escape to local shell.
                    203: .It Ic ?
1.5       stevesk   204: Synonym for help.
1.4       itojun    205: .El
1.1       djm       206: .Sh AUTHORS
                    207: Damien Miller <djm@mindrot.org>
                    208: .Sh SEE ALSO
1.7.2.4 ! jason     209: .Xr scp 1 ,
1.1       djm       210: .Xr ssh 1 ,
                    211: .Xr ssh-add 1 ,
                    212: .Xr ssh-keygen 1 ,
1.7.2.4 ! jason     213: .Xr sftp-server 8 ,
        !           214: .Xr sshd 8
        !           215: .Rs
        !           216: .%A T. Ylonen
        !           217: .%A S. Lehtinen
        !           218: .%T "SSH File Transfer Protocol"
        !           219: .%N draft-ietf-secsh-filexfer-00.txt
        !           220: .%D January 2001
        !           221: .%O work in progress material
        !           222: .Re