secftp

secftp(1)                 BSD General Commands Manual                secftp(1)

NAME
     secftp sftp — ftp replacement over ssh/rsh

SYNOPSIS
     secftp [-P remotepath] [-l user] [-p port] [-C] [-s sshargs] [hostname]
     sftp [-P remotepath] [-l user] [-n] [-s sshargs] [-e] [-f file] [-v]
            [host]
     rsftp [-P remotepath] [-l user] [-n] [-e] [-f file] [-v] [host]

DESCRIPTION
     secftp, sftp and rsftp are ftp replacements that run over an ssh or rsh
     tunnel.  These programs allows files to be transferred to and from remote
     servers.  Authentication is provided by the underlying ssh/rsh
     connection.

     By default, sftp uses ssh as the underlying connection, and rsftp uses
     rsh.  This can be overriden with the SFTP_RSH environment variable.

     When secftp, sftp or rsftp is run, the server (sftpserv) is automatically
     run on the remote end.

     If configured with the readline library, command-line editing and history
     are enabled.

     Like ftp, if there is a .netrc file in the user's home directory, it will
     be used to determine the username to use when connecting to a remote
     host.  All fields in .netrc other than machine and login are ignored
     (including the password field).  So, unless ssh/rsh is configured to
     allow a login with no password, there will still be a password prompt.

OPTIONS
     -P remotepath
           The path to sftpserv on the remote machine.  This may be either the
           full path to the program or the directory containing the program
           (if the path ends in /).  By default, sftpserv is assumed to be in
           $PATH or the location hardcoded at compile-time.

     -l user
           The username to pass to the remote server.  By default, this is the
           same as the username of the invoking user.

     -n    Do not look in .netrc for an entry describing an account on the
           remote machine.

     -p port
           The remote port that ssh is running on.  By default, this is 22
           (deprecated: use -s "-p port").

     -C    Enable compression in this ssh connection (deprecated: use -s
           "-C").

     -e    Disable readline support, if present.

     -f file
           Read commands from a file, instead of standard input.

     -v    Turns on verbose mode, which isn't really that verbose yet.

     -s sshargs
           Passes arguments directly to ssh (ex. "-C -c blowfish -v")

     host  The remote server to connect to

COMMANDS
     ! command [args]
                 Launch subshell and execute command on client machine.

     ?           Show list of commands

     ascii       No effect

     binary      No effect

     bye         Quit the program

     cd [directory]
                 Change directory on remote machine to directory, otherwise,
                 change directory to user's home directory

     close       Close the current connection to the server

     delete filename
                 Deletes filename on the server

     dir         Alias for ls -l

     exec command [args]
                 Executes a command on the server.  This command must not
                 require input from a terminal.

     exit        Quit the program

     get [-C] filename [filename2...]
                 Transfer files from the remote machine to the local machine.
                 Files are saved with the same name as on the remote machine,
                 and wildcards are expanded.  If -C is passed, a resume is
                 performed - that is, if the local file is n bytes and the
                 remote file is m bytes, (m - n) bytes are transferred.
                 Normally, -C will not be used with wildcards.

     help [command]
                 Show list of commands, or a description of command.

     image       No effect

     lcd [directory]
                 Change directory on local machine to directory, otherwise,
                 change directory to user's home directory.

     ls [args]   Execute ls on remote machine.  Since ls is being executed on
                 the remote machine, it accepts the same arguments as the ls
                 on the remote machine.

     mdelete     Alias for delete

     mdir        Alias for ls -l

     mget        Alias for get

     mkdir dir   Creates the specified directory on the server

     mput        Alias for put

     open [-P remotepath] [-l user] [-s sshargs] host
                 Open a connection to host.  If there is already a connection
                 open, it is closed before the new connection is opened.

     put filename [filename2...]
                 Transfer files from the remote machine to the local machine.
                 Files are saved with the same name as on the local machine,
                 and wildcards are expanded.

     pwd         Print the working directory on the server.

     quit        Quit the program

     rename old new
                 Renames the file old to new.

     rm filename
                 Deletes filename on the server

     rmdir dir   Removes the specified directory on the server

     version     Print the version of sftp.  If connected, print the version
                 of sftpserv also.

ABORTING OPERATIONS
     Some operations (get, put, ls, exec) may be aborted by pressing ^C.  This
     is most likely unreliable.  It definitely doesn't work on platforms that
     don't spawn a new pty for ssh/rsh, and won't work with servers older than
     version 0.8.

SEE ALSO
     ssh(1), rsh(1), ftp(1), ls(1).

     The sftp home page: http://www.xbill.org/sftp

AUTHOR
     Brian Wellington (bwelling@xbill.org)

POSIX                            May 13, 2000                            POSIX