| SFTP(1) | General Commands Manual | SFTP(1) | 
sftp —
| sftp | [ -1246Cpqrv]
      [-Bbuffer_size]
      [-bbatchfile]
      [-ccipher]
      [-Dsftp_server_path]
      [-Fssh_config]
      [-iidentity_file]
      [-llimit]
      [-ossh_option]
      [-Pport]
      [-Rnum_requests]
      [-Sprogram]
      [-ssubsystem | sftp_server] host | 
| sftp | [user@]host[:file ...] | 
| sftp | [user@]host[:dir[/]] | 
| sftp | -bbatchfile
      [user@]host | 
sftp is an interactive file transfer program, similar to
  ftp(1), which performs all operations over an encrypted
  ssh(1) transport. It may also use many features of ssh, such
  as public key authentication and compression. sftp
  connects and logs into the specified host, then enters
  an interactive command mode.
The second usage format will retrieve files automatically if a non-interactive authentication method is used; otherwise it will do so after successful interactive authentication.
The third usage format allows sftp to
    start in a remote directory.
The final usage format allows for automated sessions using the
    -b option. In such cases, it is necessary to
    configure non-interactive authentication to obviate the need to enter a
    password at connection time (see sshd(8) and
    ssh-keygen(1) for details).
Since some usage formats use colon characters to delimit host names from path names, IPv6 addresses must be enclosed in square brackets to avoid ambiguity.
The options are as follows:
-1-2-4sftp to use IPv4 addresses only.-6sftp to use IPv6 addresses only.-B
    buffer_sizesftp uses when
      transferring files. Larger buffers require fewer round trips at the cost
      of higher memory consumption. The default is 32768 bytes.-b
    batchfilesftp will abort if any of the following commands
      fail: get, put,
      rename, ln,
      rm, mkdir,
      chdir, ls,
      lchdir, chmod,
      chown, chgrp,
      lpwd, df,
      symlink, and lmkdir.
      Termination on error can be suppressed on a command by command basis by
      prefixing the command with a ‘-’ character (for example,
      -rm /tmp/blah*).-C-C flag).-c
    cipher-D
    sftp_server_path-F
    ssh_config-i
    identity_file-l
    limit-o
    ssh_optionssh in the format
      used in ssh_config(5). This is useful for specifying
      options for which there is no separate sftp
      command-line flag. For example, to specify an alternate port use:
      sftp -oPort=24. For full details of the options
      listed below, and their possible values, see
      ssh_config(5).
    
    -P
    port-p-q-R
    num_requests-rsftp does not follow symbolic links
      encountered in the tree traversal.-S
    program-s
    subsystem | sftp_serversftp over
      protocol version 1, or when the remote sshd(8) does not
      have an sftp subsystem configured.-vsftp understands a set of
  commands similar to those of ftp(1). Commands are case
  insensitive. Pathnames that contain spaces must be enclosed in quotes. Any
  special characters contained within pathnames that are recognized by
  glob(3) must be escaped with backslashes
  (‘\’).
byesftp.cd
    pathchgrp
    grp pathchmod
    mode pathchown
    own pathdf
    [-hi] [path]-h flag is specified, the capacity information
      will be displayed using "human-readable" suffixes. The
      -i flag requests display of inode information in
      addition to capacity information. This command is only supported on
      servers that implement the “statvfs@openssh.com”
    extension.exitsftp.get
    [-Ppr] remote-path
    [local-path]If either the -P or
        -p flag is specified, then full file permissions
        and access times are copied too.
If the -r flag is specified then
        directories will be copied recursively. Note that
        sftp does not follow symbolic links when
        performing recursive transfers.
helplcd
    pathlls
    [ls-options [path]]lmkdir
    pathln
    [-s] oldpath
    newpath-s flag is
      specified the created link is a symbolic link, otherwise it is a hard
      link.lpwdls
    [-1afhlnrSt] [path]The following flags are recognized and alter the behaviour of
        ls accordingly:
-1-a-f-h-l-n-r-S-tlumask
    umaskmkdir
    pathprogressput
    [-Ppr] local-path
    [remote-path]If either the -P or
        -p flag is specified, then full file permissions
        and access times are copied too.
If the -r flag is specified then
        directories will be copied recursively. Note that
        sftp does not follow symbolic links when
        performing recursive transfers.
pwdquitsftp.rename
    oldpath newpathrm
    pathrmdir
    pathsymlink
    oldpath newpathversionsftp protocol version.!command!?T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress material.
| August 7, 2011 | BSD |