Utilities
1.1 seq
1.2 tmux
1.3 tree
1.4 rsync
1.5 SFTP
1.5 SFTP
On this page:
1.5.1 Synopsis
1.5.2 Description
1.5.3 Options
1.5.4 Interactive commands
1.5.5 Example
1.5.6 See also
8.1

1.5 SFTP

sftp – OpenSSH secure file transfer

1.5.1 Synopsis

sftp [-46AaCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher]

     [-D sftp_server_path] [-F ssh_config] [-i identity_file]

     [-J destination] [-l limit] [-o ssh_option] [-P port]

     [-R num_requests] [-S program] [-s subsystem | sftp_server]

     destination

1.5.2 Description

sftp is a 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.

The destination may be specified either as
[user @]host[:path]
or as a URI in the form
sftp://[user @]host[:port][/path]

If no path is specified, or if the path is a directory, sftp will log in to the specified host and enter interactive command mode, changing to the remote directory if one was specified. An optional trailing slash can be used to force the path to be interpreted as a directory.

Since the destination formats use colon characters to delimit host names from path names or port numbers, IPv6 addresses must be enclosed in square brackets to avoid ambiguity.

1.5.3 Options
1.5.4 Interactive commands

Once in interactive mode, sftp understands a set of commands similar to those of ftp(1). Commands are case insensitive. Path names 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. Globs work.

1.5.5 Example

$ sftp institute:public_html/manual/

Connected to institute.

Changing to: /home/minuszero/public_html/manual/

sftp> put -fp *.html

sftp> bye

1.5.6 See also

ftp(1), ls(1), ssh(1), glob(7), sshd(8)