Your browser does not allow storing cookies. We recommend enabling them.

SSH Tectia 
PreviousNextUp[Contents] [Index]

    About This Document>>
    Installing SSH Tectia Client >>
    Getting Started >>
    Configuring SSH Tectia Client >>
    Connecting to a Remote Host Computer>>
    Transferring Files>>
    Tunneling Applications>>
    GUI Reference>>
    Troubleshooting >>
    Command-Line Tools >>
        ssh2 >>
        scp2 >>
        sftp2 >>
            File Name Support
            sftp2 Commands
            sftp2 Command Interpretation
            sftp2 Return Values
        ssh-keygen2 >>
        ssh-cmpclient >>
        ssh-certview >>

sftp2 Commands

When sftp2 is ready to accept commands, it will display the prompt sftp>. The user can then enter any of the following commands:

  • open [hostname|-l]

    Tries to connect to the specified host. With the -l option, the "remote" end is opened to the localhost (which does not require a server).

  • lopen [hostname|-l]

    Tries to connect the local side to the specified host. If successful, for example, lls shows the contents of that host. With the -l option, the "local" end is opened to the localhost (which does not require a server).

    The command localopen is a synonym for lopen.

  • close

    Closes the remote connection.

  • lclose

    Closes the local connection.

  • quit

    Quits the application.

  • cd directory

    Changes the current remote working directory.

  • lcd directory

    Changes the current local working directory. Also works for a network share.

  • pwd

    Prints the name of the current remote working directory.

  • lpwd

    Prints the name of the current local working directory.

  • ls [-R] [-l [-z]] [-S] [-r] [file ...]

    Lists the names of the files on the remote server. For directories, the contents of the directory are listed.

    When the -R option is specified, the directory trees are listed recursively. (By default, the subdirectories of the argument directories are not visited.)

    When the -l option is specified, file sizes, modification times, permissions and owners (as supported by the file system) are also shown. With -z, the long-format listing is generated by the client, otherwise sftp2 shows the server-generated string, if available (with the server-generated string, timestamps are in the server's locale; however, the client-generated string does not have usernames or groups).

    If -S is given, sorting is done based on file sizes. The default is to sort alphabetically.

    If -r is given, the sorting order is reversed.

    When no arguments are given, it is assumed that the contents of the current directory are being listed. Currently the options -R and -l are mutually incompatible.

  • lls [-R] [-l] [file ...]

    The same as ls, but operates on local files.

  • get [-p] [--overwrite] [-I] [-W] [-c] [--force-lower-case] [file ...]

    Transfers the specified files from the remote end to the local end. Directories are recursively copied with their contents.

    If -p,--preserve-attributes is given, sftp tries to retain permissions and timestamps.

    The --overwrite option specifies whether to overwrite existing destination file(s). The default is to overwrite.

    The -I,--interactive option prompts whether to overwrite an existing destination file (does not work with batch mode).

    If -W,--whole-file is given, incremental checksums are not made.

    If -c,--checksum is given, and source and destination files have the same size, an MD5 checksum is done to determine whether the file needs to be transferred. The default is to do checksum.

    The --force-lower-case option will cause the destination filename to be in lower case. Only ASCII characters will be affected.

    All switches can be toggled with no as an attribute, for example "--checksum=no".

  • mget [options] [file ...]

    Synonymous to get.

  • put [options] [file ...]

    Transfers the specified files from the local end to the remote end. Directories are recursively copied with their contents. Options are the same as for get.

  • mput [options] [file ...]

    Synonymous to put.

  • setperm [[p]file_permission[:directory_permission]]

    Sets both the default file and directory permission bits for upload. Prefix the file permission bits with p to preserve the permissions of existing files or directories. Use octal numbers to define the permission bits. The default values are 644 for files and 755 for directories.

  • rename source target

    Renames the file source to target.

  • lrename source target

    Same as rename, but operates on local files.

  • rm file

    Tries to delete the specified file.

  • lrm file

    The same as rm, but operates on local files.

  • mkdir directory

    Tries to create the specified directory.

  • lmkdir directory

    The same as mkdir, but operates on local files.

  • rmdir directory

    Tries to delete the specified directory.

  • lrmdir directory

    The same as rmdir, but operates on local files.

  • readlink path

    Provided that path is a symbolic link, shows where the link is pointing to.

  • lreadlink path

    Same as readlink, but operates on local files.

  • symlink targetpath linkpath

    Creates symbolic link linkpath, which will point to targetpath.

  • lsymlink targetpath linkpath

    Same as symlink, but operates on local files.

  • lsroots

    Dumps the virtual roots of the server. This is an extension required by older versions of VShell (from VanDyke Software), and only usable against it. SSH Tectia Server (Windows version) displays the file system roots in the Unix style, and does not require this extension.

  • ascii [-s] [-f] [remote_nl_conv] [local_nl_conv]

    With the -s option, shows the current newline convention. remote_nl_conv sets the remote newline convention. local_nl_conv operates on the local side, but is not as useful (the correct local newline convention is usually compiled in, so this is mainly for testing). Please note that these are only hints for the underlying transfer layer, which tries to use the newline convention given by the server wherever possible. You can set either of these to ask, which will cause sftp to prompt you for the newline convention when needed. With the exception of the -s option, this command sets the transfer mode to ASCII, i.e. newlines will be converted according to the conventions. Available conventions are dos, unix, and mac, using "\r\n", "\n", and "\r" as newlines, respectively.

  • binary

    Files will be transferred unmodified.

  • auto

    Files whose extension matches the one set with setext will be transferred using ASCII mode. Other files will be transferred unmodified.

  • setext extension [extension ...]

    Set the file types which will be transferred in ASCII mode, if the transfer mode is auto. Standard zsh-fileglob regexs can be used for matching (only the file extension is matched, i.e. extension "*ml" matches with files foo.html and

  • getext

    Displays the extensions of files which will be transferred using ASCII (newline) conversion in the auto transfer mode.

  • chmod [options] OCTAL-MODE [file ...]

  • chmod [options] [ugoa][+-=][rwxs] [file ...]

    Sets file permissions of the specified file or files to the bit pattern OCTAL-MODE or changes permissions according to the symbolic mode [ugoa][+-=][rwxs].

    Only one symbolic mode combination is supported.

    The options are:

    • -R

      recursive (recursively changes files and directories)

    • -f

      silent (error messages suppressed)

    • -v

      verbose (lists every file processed)

  • lchmod

    Same as chmod, but operates on local files.

  • debug [disable|no|debuglevel]

    With disable or no, disables debugging. Otherwise, sets debuglevel as debug level string, as per command-line option "-D".

  • verbose

    Enables verbose mode (identical to the "-D 2" command-line option). You may later disable verbose mode with the command "debug disable".

  • help [topic]

    If a topic is not given, lists the available topics. If a topic is given, outputs the available online help on the topic.

PreviousNextUp[Contents] [Index]

[ Contact Information | Support | Feedback | SSH Home Page | SSH Products ]

Copyright © 2010 SSH Communications Security Corp.
This software is protected by international copyright laws. All rights reserved.
Copyright Notice




What to read next:

  • Reduce Secure Shell risk. Get to know the NIST 7966.

    The NISTIR 7966 guideline from the Computer Security Division of NIST is a direct call to action for organizations regardless of industry and is a mandate for the US Federal government.
    Download now
  • ISACA Practitioner Guide for SSH

    With contributions from practitioners, specialists and SSH.COM experts, the ISACA “SSH: Practitioner Considerations” guide is vital best practice from the compliance and audit community.
    Download now