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

1.130   ! jmc         1: .\" $OpenBSD: sftp.1,v 1.129 2020/04/03 04:34:15 djm 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.130   ! jmc        25: .Dd $Mdocdate: April 3 2020 $
1.1       djm        26: .Dt SFTP 1
                     27: .Os
                     28: .Sh NAME
                     29: .Nm sftp
1.128     jmc        30: .Nd OpenSSH secure file transfer
1.1       djm        31: .Sh SYNOPSIS
1.43      jmc        32: .Nm sftp
1.129     djm        33: .Op Fl 46aCfNpqrv
1.46      jmc        34: .Op Fl B Ar buffer_size
1.29      markus     35: .Op Fl b Ar batchfile
1.70      djm        36: .Op Fl c Ar cipher
1.72      djm        37: .Op Fl D Ar sftp_server_path
1.46      jmc        38: .Op Fl F Ar ssh_config
1.73      jmc        39: .Op Fl i Ar identity_file
1.124     tb         40: .Op Fl J Ar destination
1.85      djm        41: .Op Fl l Ar limit
1.29      markus     42: .Op Fl o Ar ssh_option
1.72      djm        43: .Op Fl P Ar port
1.30      djm        44: .Op Fl R Ar num_requests
1.26      stevesk    45: .Op Fl S Ar program
1.46      jmc        46: .Op Fl s Ar subsystem | sftp_server
1.111     millert    47: .Ar destination
1.1       djm        48: .Sh DESCRIPTION
                     49: .Nm
1.111     millert    50: is a file transfer program, similar to
1.1       djm        51: .Xr ftp 1 ,
                     52: which performs all operations over an encrypted
                     53: .Xr ssh 1
                     54: transport.
                     55: It may also use many features of ssh, such as public key authentication and
                     56: compression.
1.111     millert    57: .Pp
                     58: The
                     59: .Ar destination
                     60: may be specified either as
1.112     jmc        61: .Sm off
                     62: .Oo user @ Oc host Op : path
                     63: .Sm on
                     64: or as a URI in the form
                     65: .Sm off
                     66: .No sftp:// Oo user @ Oc host Oo : port Oc Op / path .
                     67: .Sm on
1.111     millert    68: .Pp
                     69: If the
                     70: .Ar destination
                     71: includes a
                     72: .Ar path
                     73: and it is not a directory,
1.1       djm        74: .Nm
1.111     millert    75: will retrieve files automatically if a non-interactive
1.18      stevesk    76: authentication method is used; otherwise it will do so after
                     77: successful interactive authentication.
1.15      mouring    78: .Pp
1.111     millert    79: If no
                     80: .Ar path
                     81: is specified, or if the
                     82: .Ar path
                     83: is a directory,
1.60      jaredy     84: .Nm
1.111     millert    85: will log in to the specified
                     86: .Ar host
                     87: and enter interactive command mode, changing to the remote directory
                     88: if one was specified.
                     89: An optional trailing slash can be used to force the
                     90: .Ar path
                     91: to be interpreted as a directory.
1.1       djm        92: .Pp
1.111     millert    93: Since the destination formats use colon characters to delimit host
                     94: names from path names or port numbers, IPv6 addresses must be
                     95: enclosed in square brackets to avoid ambiguity.
1.89      djm        96: .Pp
1.1       djm        97: The options are as follows:
                     98: .Bl -tag -width Ds
1.70      djm        99: .It Fl 4
                    100: Forces
                    101: .Nm
                    102: to use IPv4 addresses only.
                    103: .It Fl 6
                    104: Forces
                    105: .Nm
                    106: to use IPv6 addresses only.
1.94      jmc       107: .It Fl a
1.99      jmc       108: Attempt to continue interrupted transfers rather than overwriting
1.98      logan     109: existing partial or complete copies of files.
1.99      jmc       110: If the partial contents differ from those being transferred,
1.98      logan     111: then the resultant file is likely to be corrupt.
1.46      jmc       112: .It Fl B Ar buffer_size
                    113: Specify the size of the buffer that
                    114: .Nm
                    115: uses when transferring files.
                    116: Larger buffers require fewer round trips at the cost of higher
                    117: memory consumption.
                    118: The default is 32768 bytes.
1.10      deraadt   119: .It Fl b Ar batchfile
                    120: Batch mode reads a series of commands from an input
1.13      stevesk   121: .Ar batchfile
1.10      deraadt   122: instead of
1.13      stevesk   123: .Em stdin .
                    124: Since it lacks user interaction it should be used in conjunction with
1.111     millert   125: non-interactive authentication to obviate the need to enter a password
                    126: at connection time (see
                    127: .Xr sshd 8
                    128: and
                    129: .Xr ssh-keygen 1
                    130: for details).
1.122     djm       131: .Pp
1.50      djm       132: A
1.51      jmc       133: .Ar batchfile
                    134: of
                    135: .Sq \-
1.50      djm       136: may be used to indicate standard input.
1.13      stevesk   137: .Nm
1.21      itojun    138: will abort if any of the following
                    139: commands fail:
1.121     schwarze  140: .Ic get , put , reget , reput , rename , ln ,
1.41      jmc       141: .Ic rm , mkdir , chdir , ls ,
1.66      jmc       142: .Ic lchdir , chmod , chown ,
1.88      djm       143: .Ic chgrp , lpwd , df , symlink ,
1.10      deraadt   144: and
1.13      stevesk   145: .Ic lmkdir .
1.122     djm       146: .Pp
1.41      jmc       147: Termination on error can be suppressed on a command by command basis by
                    148: prefixing the command with a
1.51      jmc       149: .Sq \-
1.44      jmc       150: character (for example,
                    151: .Ic -rm /tmp/blah* ) .
1.122     djm       152: Echo of the command may be suppressed by prefixing the command with a
                    153: .Sq @
                    154: character.
                    155: These two prefixes may be combined in any order, for example
                    156: .Ic -@ls /bsd .
1.71      jmc       157: .It Fl C
                    158: Enables compression (via ssh's
                    159: .Fl C
                    160: flag).
1.70      djm       161: .It Fl c Ar cipher
                    162: Selects the cipher to use for encrypting the data transfers.
                    163: This option is directly passed to
                    164: .Xr ssh 1 .
1.72      djm       165: .It Fl D Ar sftp_server_path
                    166: Connect directly to a local sftp server
                    167: (rather than via
                    168: .Xr ssh 1 ) .
                    169: This option may be useful in debugging the client and server.
1.46      jmc       170: .It Fl F Ar ssh_config
                    171: Specifies an alternative
                    172: per-user configuration file for
                    173: .Xr ssh 1 .
                    174: This option is directly passed to
                    175: .Xr ssh 1 .
1.95      djm       176: .It Fl f
                    177: Requests that files be flushed to disk immediately after transfer.
                    178: When uploading files, this feature is only enabled if the server
                    179: implements the "fsync@openssh.com" extension.
1.70      djm       180: .It Fl i Ar identity_file
                    181: Selects the file from which the identity (private key) for public key
                    182: authentication is read.
1.124     tb        183: This option is directly passed to
                    184: .Xr ssh 1 .
                    185: .It Fl J Ar destination
1.125     jmc       186: Connect to the target host by first making an
1.124     tb        187: .Nm
                    188: connection to the jump host described by
                    189: .Ar destination
                    190: and then establishing a TCP forwarding to the ultimate destination from
                    191: there.
                    192: Multiple jump hops may be specified separated by comma characters.
                    193: This is a shortcut to specify a
                    194: .Cm ProxyJump
                    195: configuration directive.
1.70      djm       196: This option is directly passed to
                    197: .Xr ssh 1 .
1.85      djm       198: .It Fl l Ar limit
                    199: Limits the used bandwidth, specified in Kbit/s.
1.130   ! jmc       200: .It Fl N
        !           201: Disables quiet mode, e.g. to override the implicit quiet mode set by the
        !           202: .Fl b
        !           203: flag.
1.1       djm       204: .It Fl o Ar ssh_option
1.23      stevesk   205: Can be used to pass options to
                    206: .Nm ssh
1.35      stevesk   207: in the format used in
                    208: .Xr ssh_config 5 .
                    209: This is useful for specifying options
1.23      stevesk   210: for which there is no separate
                    211: .Nm sftp
1.44      jmc       212: command-line flag.
                    213: For example, to specify an alternate port use:
1.26      stevesk   214: .Ic sftp -oPort=24 .
1.46      jmc       215: For full details of the options listed below, and their possible values, see
                    216: .Xr ssh_config 5 .
                    217: .Pp
                    218: .Bl -tag -width Ds -offset indent -compact
                    219: .It AddressFamily
                    220: .It BatchMode
                    221: .It BindAddress
1.114     jmc       222: .It BindInterface
1.97      djm       223: .It CanonicalDomains
                    224: .It CanonicalizeFallbackLocal
                    225: .It CanonicalizeHostname
                    226: .It CanonicalizeMaxDots
                    227: .It CanonicalizePermittedCNAMEs
1.120     jmc       228: .It CASignatureAlgorithms
1.102     jmc       229: .It CertificateFile
1.46      jmc       230: .It ChallengeResponseAuthentication
                    231: .It CheckHostIP
                    232: .It Ciphers
                    233: .It Compression
1.110     naddy     234: .It ConnectionAttempts
1.54      dtucker   235: .It ConnectTimeout
1.55      djm       236: .It ControlMaster
                    237: .It ControlPath
1.91      djm       238: .It ControlPersist
1.46      jmc       239: .It GlobalKnownHostsFile
                    240: .It GSSAPIAuthentication
                    241: .It GSSAPIDelegateCredentials
1.61      jmc       242: .It HashKnownHosts
1.46      jmc       243: .It Host
                    244: .It HostbasedAuthentication
1.101     djm       245: .It HostbasedKeyTypes
1.46      jmc       246: .It HostKeyAlgorithms
                    247: .It HostKeyAlias
1.126     jmc       248: .It Hostname
1.104     jmc       249: .It IdentitiesOnly
1.103     markus    250: .It IdentityAgent
1.46      jmc       251: .It IdentityFile
1.87      jmc       252: .It IPQoS
1.91      djm       253: .It KbdInteractiveAuthentication
1.58      djm       254: .It KbdInteractiveDevices
1.86      jmc       255: .It KexAlgorithms
1.46      jmc       256: .It LogLevel
                    257: .It MACs
                    258: .It NoHostAuthenticationForLocalhost
                    259: .It NumberOfPasswordPrompts
                    260: .It PasswordAuthentication
1.83      markus    261: .It PKCS11Provider
1.46      jmc       262: .It Port
                    263: .It PreferredAuthentications
                    264: .It ProxyCommand
1.105     jmc       265: .It ProxyJump
1.108     jmc       266: .It PubkeyAcceptedKeyTypes
1.46      jmc       267: .It PubkeyAuthentication
1.63      dtucker   268: .It RekeyLimit
1.53      jmc       269: .It SendEnv
1.49      markus    270: .It ServerAliveInterval
                    271: .It ServerAliveCountMax
1.116     jmc       272: .It SetEnv
1.46      jmc       273: .It StrictHostKeyChecking
1.48      markus    274: .It TCPKeepAlive
1.100     djm       275: .It UpdateHostKeys
1.46      jmc       276: .It User
                    277: .It UserKnownHostsFile
                    278: .It VerifyHostKeyDNS
                    279: .El
1.72      djm       280: .It Fl P Ar port
                    281: Specifies the port to connect to on the remote host.
1.74      djm       282: .It Fl p
                    283: Preserves modification times, access times, and modes from the
                    284: original files transferred.
1.70      djm       285: .It Fl q
                    286: Quiet mode: disables the progress meter as well as warning and
                    287: diagnostic messages from
                    288: .Xr ssh 1 .
1.30      djm       289: .It Fl R Ar num_requests
1.44      jmc       290: Specify how many requests may be outstanding at any one time.
                    291: Increasing this may slightly improve file transfer speed
                    292: but will increase memory usage.
1.67      djm       293: The default is 64 outstanding requests.
1.74      djm       294: .It Fl r
                    295: Recursively copy entire directories when uploading and downloading.
                    296: Note that
                    297: .Nm
                    298: does not follow symbolic links encountered in the tree traversal.
1.26      stevesk   299: .It Fl S Ar program
                    300: Name of the
                    301: .Ar program
                    302: to use for the encrypted connection.
                    303: The program must understand
                    304: .Xr ssh 1
                    305: options.
1.46      jmc       306: .It Fl s Ar subsystem | sftp_server
                    307: Specifies the SSH2 subsystem or the path for an sftp server
                    308: on the remote host.
1.109     jmc       309: A path is useful when the remote
1.46      jmc       310: .Xr sshd 8
                    311: does not have an sftp subsystem configured.
                    312: .It Fl v
                    313: Raise logging level.
                    314: This option is also passed to ssh.
1.1       djm       315: .El
                    316: .Sh INTERACTIVE COMMANDS
1.2       djm       317: Once in interactive mode,
                    318: .Nm
1.21      itojun    319: understands a set of commands similar to those of
1.1       djm       320: .Xr ftp 1 .
1.60      jaredy    321: Commands are case insensitive.
                    322: Pathnames that contain spaces must be enclosed in quotes.
                    323: Any special characters contained within pathnames that are recognized by
                    324: .Xr glob 3
                    325: must be escaped with backslashes
                    326: .Pq Sq \e .
                    327: .Bl -tag -width Ds
1.22      markus    328: .It Ic bye
1.44      jmc       329: Quit
                    330: .Nm sftp .
1.113     djm       331: .It Ic cd Op Ar path
1.21      itojun    332: Change remote directory to
1.3       deraadt   333: .Ar path .
1.113     djm       334: If
                    335: .Ar path
                    336: is not specified, then change directory to the one the session started in.
1.123     djm       337: .It Xo Ic chgrp
                    338: .Op Fl h
                    339: .Ar grp
                    340: .Ar path
                    341: .Xc
1.21      itojun    342: Change group of file
1.5       stevesk   343: .Ar path
                    344: to
1.1       djm       345: .Ar grp .
1.123     djm       346: If the
                    347: .Fl h
                    348: flag is specified, then symlinks will not be followed.
1.60      jaredy    349: .Ar path
                    350: may contain
1.118     kn        351: .Xr glob 7
1.60      jaredy    352: characters and may match multiple files.
1.1       djm       353: .Ar grp
1.5       stevesk   354: must be a numeric GID.
1.123     djm       355: .It Xo Ic chmod
                    356: .Op Fl h
                    357: .Ar mode
                    358: .Ar path
                    359: .Xc
1.21      itojun    360: Change permissions of file
1.5       stevesk   361: .Ar path
                    362: to
1.3       deraadt   363: .Ar mode .
1.123     djm       364: If the
                    365: .Fl h
                    366: flag is specified, then symlinks will not be followed.
1.60      jaredy    367: .Ar path
                    368: may contain
1.118     kn        369: .Xr glob 7
1.60      jaredy    370: characters and may match multiple files.
1.123     djm       371: .It Xo Ic chown
                    372: .Op Fl h
                    373: .Ar own
                    374: .Ar path
                    375: .Xc
1.21      itojun    376: Change owner of file
1.5       stevesk   377: .Ar path
                    378: to
1.1       djm       379: .Ar own .
1.123     djm       380: If the
                    381: .Fl h
                    382: flag is specified, then symlinks will not be followed.
1.60      jaredy    383: .Ar path
                    384: may contain
1.118     kn        385: .Xr glob 7
1.60      jaredy    386: characters and may match multiple files.
1.1       djm       387: .Ar own
                    388: must be a numeric UID.
1.65      djm       389: .It Xo Ic df
                    390: .Op Fl hi
                    391: .Op Ar path
                    392: .Xc
                    393: Display usage information for the filesystem holding the current directory
                    394: (or
                    395: .Ar path
                    396: if specified).
                    397: If the
                    398: .Fl h
                    399: flag is specified, the capacity information will be displayed using
                    400: "human-readable" suffixes.
                    401: The
                    402: .Fl i
                    403: flag requests display of inode information in addition to capacity information.
                    404: This command is only supported on servers that implement the
                    405: .Dq statvfs@openssh.com
                    406: extension.
1.11      deraadt   407: .It Ic exit
1.44      jmc       408: Quit
                    409: .Nm sftp .
1.7       djm       410: .It Xo Ic get
1.127     jmc       411: .Op Fl afpR
1.7       djm       412: .Ar remote-path
                    413: .Op Ar local-path
                    414: .Xc
1.1       djm       415: Retrieve the
1.5       stevesk   416: .Ar remote-path
1.1       djm       417: and store it on the local machine.
                    418: If the local
1.21      itojun    419: path name is not specified, it is given the same name it has on the
1.44      jmc       420: remote machine.
1.60      jaredy    421: .Ar remote-path
                    422: may contain
1.118     kn        423: .Xr glob 7
1.60      jaredy    424: characters and may match multiple files.
                    425: If it does and
                    426: .Ar local-path
                    427: is specified, then
                    428: .Ar local-path
                    429: must specify a directory.
1.74      djm       430: .Pp
1.92      djm       431: If the
                    432: .Fl a
                    433: flag is specified, then attempt to resume partial transfers of existing files.
                    434: Note that resumption assumes that any partial copy of the local file matches
                    435: the remote copy.
1.93      djm       436: If the remote file contents differ from the partial local copy then the
                    437: resultant file is likely to be corrupt.
1.92      djm       438: .Pp
1.95      djm       439: If the
                    440: .Fl f
                    441: flag is specified, then
                    442: .Xr fsync 2
1.96      jmc       443: will be called after the file transfer has completed to flush the file
1.95      djm       444: to disk.
                    445: .Pp
1.127     jmc       446: If the
1.74      djm       447: .Fl p
1.127     jmc       448: .\" undocumented redundant alias
                    449: .\" or
                    450: .\" .Fl P
1.60      jaredy    451: flag is specified, then full file permissions and access times are
1.7       djm       452: copied too.
1.74      djm       453: .Pp
                    454: If the
1.127     jmc       455: .Fl R
                    456: .\" undocumented redundant alias
                    457: .\" or
                    458: .\" .Fl r
1.74      djm       459: flag is specified then directories will be copied recursively.
                    460: Note that
                    461: .Nm
                    462: does not follow symbolic links when performing recursive transfers.
1.11      deraadt   463: .It Ic help
                    464: Display help text.
1.113     djm       465: .It Ic lcd Op Ar path
1.46      jmc       466: Change local directory to
                    467: .Ar path .
1.113     djm       468: If
                    469: .Ar path
                    470: is not specified, then change directory to the local user's home directory.
1.3       deraadt   471: .It Ic lls Op Ar ls-options Op Ar path
1.21      itojun    472: Display local directory listing of either
1.1       djm       473: .Ar path
                    474: or current directory if
                    475: .Ar path
1.5       stevesk   476: is not specified.
1.60      jaredy    477: .Ar ls-options
                    478: may contain any flags supported by the local system's
                    479: .Xr ls 1
                    480: command.
                    481: .Ar path
                    482: may contain
1.118     kn        483: .Xr glob 7
1.60      jaredy    484: characters and may match multiple files.
1.3       deraadt   485: .It Ic lmkdir Ar path
1.1       djm       486: Create local directory specified by
1.3       deraadt   487: .Ar path .
1.88      djm       488: .It Xo Ic ln
                    489: .Op Fl s
                    490: .Ar oldpath
                    491: .Ar newpath
                    492: .Xc
                    493: Create a link from
1.12      djm       494: .Ar oldpath
                    495: to
                    496: .Ar newpath .
1.88      djm       497: If the
                    498: .Fl s
                    499: flag is specified the created link is a symbolic link, otherwise it is
                    500: a hard link.
1.3       deraadt   501: .It Ic lpwd
                    502: Print local working directory.
1.36      djm       503: .It Xo Ic ls
1.82      jmc       504: .Op Fl 1afhlnrSt
1.36      djm       505: .Op Ar path
                    506: .Xc
1.60      jaredy    507: Display a remote directory listing of either
1.1       djm       508: .Ar path
1.60      jaredy    509: or the current directory if
1.5       stevesk   510: .Ar path
1.44      jmc       511: is not specified.
1.60      jaredy    512: .Ar path
                    513: may contain
1.118     kn        514: .Xr glob 7
1.60      jaredy    515: characters and may match multiple files.
                    516: .Pp
                    517: The following flags are recognized and alter the behaviour of
                    518: .Ic ls
                    519: accordingly:
                    520: .Bl -tag -width Ds
                    521: .It Fl 1
                    522: Produce single columnar output.
                    523: .It Fl a
                    524: List files beginning with a dot
                    525: .Pq Sq \&. .
                    526: .It Fl f
                    527: Do not sort the listing.
                    528: The default sort order is lexicographical.
1.81      djm       529: .It Fl h
                    530: When used with a long format option, use unit suffixes: Byte, Kilobyte,
                    531: Megabyte, Gigabyte, Terabyte, Petabyte, and Exabyte in order to reduce
                    532: the number of digits to four or fewer using powers of 2 for sizes (K=1024,
                    533: M=1048576, etc.).
1.82      jmc       534: .It Fl l
                    535: Display additional details including permissions
                    536: and ownership information.
1.60      jaredy    537: .It Fl n
                    538: Produce a long listing with user and group information presented
1.56      djm       539: numerically.
1.60      jaredy    540: .It Fl r
                    541: Reverse the sort order of the listing.
                    542: .It Fl S
                    543: Sort the listing by file size.
                    544: .It Fl t
                    545: Sort the listing by last modification time.
                    546: .El
1.3       deraadt   547: .It Ic lumask Ar umask
1.21      itojun    548: Set local umask to
1.3       deraadt   549: .Ar umask .
                    550: .It Ic mkdir Ar path
1.1       djm       551: Create remote directory specified by
1.3       deraadt   552: .Ar path .
1.40      fgsch     553: .It Ic progress
                    554: Toggle display of progress meter.
1.7       djm       555: .It Xo Ic put
1.127     jmc       556: .Op Fl afpR
1.7       djm       557: .Ar local-path
1.37      djm       558: .Op Ar remote-path
1.7       djm       559: .Xc
1.1       djm       560: Upload
1.5       stevesk   561: .Ar local-path
1.44      jmc       562: and store it on the remote machine.
                    563: If the remote path name is not specified, it is given the same name it has
                    564: on the local machine.
1.60      jaredy    565: .Ar local-path
                    566: may contain
1.118     kn        567: .Xr glob 7
1.60      jaredy    568: characters and may match multiple files.
                    569: If it does and
                    570: .Ar remote-path
                    571: is specified, then
                    572: .Ar remote-path
                    573: must specify a directory.
1.95      djm       574: .Pp
                    575: If the
1.99      jmc       576: .Fl a
1.98      logan     577: flag is specified, then attempt to resume partial
                    578: transfers of existing files.
1.99      jmc       579: Note that resumption assumes that any partial copy of the remote file
1.98      logan     580: matches the local copy.
                    581: If the local file contents differ from the remote local copy then
                    582: the resultant file is likely to be corrupt.
                    583: .Pp
                    584: If the
1.95      djm       585: .Fl f
                    586: flag is specified, then a request will be sent to the server to call
                    587: .Xr fsync 2
                    588: after the file has been transferred.
                    589: Note that this is only supported by servers that implement
                    590: the "fsync@openssh.com" extension.
1.74      djm       591: .Pp
1.127     jmc       592: If the
1.74      djm       593: .Fl p
1.127     jmc       594: .\" undocumented redundant alias
                    595: .\" or
                    596: .\" .Fl P
1.74      djm       597: flag is specified, then full file permissions and access times are
1.7       djm       598: copied too.
1.74      djm       599: .Pp
                    600: If the
1.127     jmc       601: .Fl R
                    602: .\" undocumented redundant alias
                    603: .\" or
                    604: .\" .Fl r
1.74      djm       605: flag is specified then directories will be copied recursively.
                    606: Note that
                    607: .Nm
                    608: does not follow symbolic links when performing recursive transfers.
1.3       deraadt   609: .It Ic pwd
                    610: Display remote working directory.
                    611: .It Ic quit
1.44      jmc       612: Quit
                    613: .Nm sftp .
1.92      djm       614: .It Xo Ic reget
1.127     jmc       615: .Op Fl fpR
1.92      djm       616: .Ar remote-path
                    617: .Op Ar local-path
                    618: .Xc
                    619: Resume download of
                    620: .Ar remote-path .
                    621: Equivalent to
                    622: .Ic get
                    623: with the
1.98      logan     624: .Fl a
                    625: flag set.
                    626: .It Xo Ic reput
1.127     jmc       627: .Op Fl fpR
                    628: .Ar local-path
                    629: .Op Ar remote-path
1.98      logan     630: .Xc
                    631: Resume upload of
1.127     jmc       632: .Ar local-path .
1.98      logan     633: Equivalent to
                    634: .Ic put
1.99      jmc       635: with the
1.92      djm       636: .Fl a
                    637: flag set.
1.3       deraadt   638: .It Ic rename Ar oldpath Ar newpath
1.1       djm       639: Rename remote file from
                    640: .Ar oldpath
                    641: to
1.3       deraadt   642: .Ar newpath .
1.46      jmc       643: .It Ic rm Ar path
                    644: Delete remote file specified by
                    645: .Ar path .
1.3       deraadt   646: .It Ic rmdir Ar path
1.1       djm       647: Remove remote directory specified by
1.3       deraadt   648: .Ar path .
1.12      djm       649: .It Ic symlink Ar oldpath Ar newpath
1.21      itojun    650: Create a symbolic link from
1.12      djm       651: .Ar oldpath
                    652: to
                    653: .Ar newpath .
1.38      fgsch     654: .It Ic version
                    655: Display the
                    656: .Nm
                    657: protocol version.
1.69      sobrado   658: .It Ic \&! Ns Ar command
1.21      itojun    659: Execute
1.1       djm       660: .Ar command
1.3       deraadt   661: in local shell.
1.45      jmc       662: .It Ic \&!
1.3       deraadt   663: Escape to local shell.
1.45      jmc       664: .It Ic \&?
1.5       stevesk   665: Synonym for help.
1.4       itojun    666: .El
1.1       djm       667: .Sh SEE ALSO
1.46      jmc       668: .Xr ftp 1 ,
1.60      jaredy    669: .Xr ls 1 ,
1.17      markus    670: .Xr scp 1 ,
1.1       djm       671: .Xr ssh 1 ,
                    672: .Xr ssh-add 1 ,
                    673: .Xr ssh-keygen 1 ,
1.119     jmc       674: .Xr ssh_config 5 ,
1.118     kn        675: .Xr glob 7 ,
1.17      markus    676: .Xr sftp-server 8 ,
                    677: .Xr sshd 8
                    678: .Rs
1.20      deraadt   679: .%A T. Ylonen
                    680: .%A S. Lehtinen
1.17      markus    681: .%T "SSH File Transfer Protocol"
                    682: .%N draft-ietf-secsh-filexfer-00.txt
                    683: .%D January 2001
                    684: .%O work in progress material
                    685: .Re