SFTP(1) BSD General Commands Manual SFTP(1)
NAME
sftp − secure file transfer program |
SYNOPSIS
sftp [−1Cv] [−B buffer_size] [−b batchfile] [−F ssh_config] [−o ssh_option] [−P sftp_server_path] [−R num_requests] [−S program] [−s subsystem | sftp_server] host |
sftp [ |
user@]host[:file ...]
sftp [ DESCRIPTION |
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). The options are as follows: |
−1’ Specify the use of protocol version 1.
−B buffer_size −b batchfile −C’ Enables compression (via ssh’s −C flag). −F ssh_config −o ssh_option AddressFamily −P sftp_server_path −R num_requests −S program −s subsystem | sftp_server −v’ Raise logging level. This option is also passed to ssh. INTERACTIVE COMMANDS |
Once in interactive mode, sftp 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 (’\’). |
bye’ Quit sftp.
cd path chgrp grp path chmod mode path chown own path df [−hi] [path] exit’ Quit sftp. get [−P] remote-path
[local-path] help’ Display help text. lcd path lls [ls-options [path]] lmkdir path ln oldpath newpath lpwd’ Print local working directory. ls [−1aflnrSt] [path] The following flags are recognized and alter the behaviour of ls accordingly: −1’ Produce single columnar output. −a’ List files beginning with a dot (’.’). −f’ Do not sort the listing. The default sort order is lexicographical. −l’ Display additional details including permissions and ownership information. −n’ Produce a long listing with user and group information presented numerically. −r’ Reverse the sort order of the listing. −S’ Sort the listing by file size. −t’ Sort the listing by last modification time. lumask umask mkdir path progress put [−P] local-path
[remote-path] pwd’ Display remote working directory. quit’ Quit sftp. rename oldpath newpath rm path rmdir path symlink oldpath newpath version !command !’ Escape to local shell. ?’ Synonym for help. IPV6 |
IPv6 address can be used everywhere where IPv4 address. In all entries must be the IPv6 address enclosed in square brackets. Note: The square brackets are metacharacters for the shell and must be escaped in shell. |
SEE ALSO
ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3), ssh_config(5), sftp-server(8), sshd(8) |
T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-filexfer-00.txt, January 2001, work in progressmaterial. BSD September 27, 2013 BSD