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

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