Man1 - sftp.1

is a file transfer program, similar to

which performs all operations over an encrypted

transport. It may also use many features of ssh, such as public key authentication and compression.

The

may be specified either as

or as a URI in the form

If the

includes a

and it is not a directory,

will retrieve files automatically if a non-interactive authentication method is used; otherwise it will do so after successful interactive authentication.

If no

is specified, or if the

is a directory,

will log in to the specified

and enter interactive command mode, changing to the remote directory if one was specified. An optional trailing slash can be used to force the

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.

The options are as follows:

Forces

to use IPv4 addresses only.

Forces

to use IPv6 addresses only.

Allows forwarding of

to the remote system. The default is not to forward an authentication agent.

Attempt to continue interrupted transfers rather than overwriting existing partial or complete copies of files. If the partial contents differ from those being transferred, then the resultant file is likely to be corrupt.

Specify the size of the buffer that

uses when transferring files. Larger buffers require fewer round trips at the cost of higher memory consumption. The default is 32768 bytes.

Batch mode reads a series of commands from an input

instead of

Since it lacks user interaction it should be used in conjunction with non-interactive authentication to obviate the need to enter a password at connection time (see

and

for details).

A

of

may be used to indicate standard input.

will abort if any of the following commands fail:

and

Termination on error can be suppressed on a command by command basis by prefixing the command with a

character (for example,

Echo of the command may be suppressed by prefixing the command with a

character. These two prefixes may be combined in any order, for example

Enables compression (via ssh’s

flag).

Selects the cipher to use for encrypting the data transfers. This option is directly passed to

Connect directly to a local sftp server (rather than via

This option may be useful in debugging the client and server.

Specifies an alternative per-user configuration file for

This option is directly passed to

Requests that files be flushed to disk immediately after transfer. When uploading files, this feature is only enabled if the server implements the “fsync@openssh.com” extension.

Selects the file from which the identity (private key) for public key authentication is read. This option is directly passed to

Connect to the target host by first making an

connection to the jump host described by

and then establishing a TCP forwarding to the ultimate destination from there. Multiple jump hops may be specified separated by comma characters. This is a shortcut to specify a

configuration directive. This option is directly passed to

Limits the used bandwidth, specified in Kbit/s.

Disables quiet mode, e.g. to override the implicit quiet mode set by the

flag.

Can be used to pass options to

in the format used in

This is useful for specifying options for which there is no separate

command-line flag. For example, to specify an alternate port use:

For full details of the options listed below, and their possible values, see

Specifies the port to connect to on the remote host.

Preserves modification times, access times, and modes from the original files transferred.

Quiet mode: disables the progress meter as well as warning and diagnostic messages from

Specify how many requests may be outstanding at any one time. Increasing this may slightly improve file transfer speed but will increase memory usage. The default is 64 outstanding requests.

Recursively copy entire directories when uploading and downloading. Note that

does not follow symbolic links encountered in the tree traversal.

Name of the

to use for the encrypted connection. The program must understand

options.

Specifies the SSH2 subsystem or the path for an sftp server on the remote host. A path is useful when the remote

does not have an sftp subsystem configured.

Raise logging level. This option is also passed to ssh.

Once in interactive mode,

understands a set of commands similar to those of

Commands are case insensitive. Pathnames that contain spaces must be enclosed in quotes. Any special characters contained within pathnames that are recognized by

must be escaped with backslashes

Quit

Change remote directory to

If

is not specified, then change directory to the one the session started in.

Change group of file

to

may contain

characters and may match multiple files.

must be a numeric GID.

If the

flag is specified, then symlinks will not be followed. Note that this is only supported by servers that implement the “lsetstat@openssh.com” extension.

Change permissions of file

to

may contain

characters and may match multiple files.

If the

flag is specified, then symlinks will not be followed. Note that this is only supported by servers that implement the “lsetstat@openssh.com” extension.

Change owner of file

to

may contain

characters and may match multiple files.

must be a numeric UID.

If the

flag is specified, then symlinks will not be followed. Note that this is only supported by servers that implement the “lsetstat@openssh.com” extension.

Display usage information for the filesystem holding the current directory (or

if specified). If the

flag is specified, the capacity information will be displayed using “human-readable” suffixes. The

flag requests display of inode information in addition to capacity information. This command is only supported on servers that implement the

extension.

Quit

Retrieve the

and store it on the local machine. If the local path name is not specified, it is given the same name it has on the remote machine.

may contain

characters and may match multiple files. If it does and

is specified, then

must specify a directory.

If the

flag is specified, then attempt to resume partial transfers of existing files. Note that resumption assumes that any partial copy of the local file matches the remote copy. If the remote file contents differ from the partial local copy then the resultant file is likely to be corrupt.

If the

flag is specified, then

will be called after the file transfer has completed to flush the file to disk.

If the

flag is specified, then full file permissions and access times are copied too.

If the

flag is specified then directories will be copied recursively. Note that

does not follow symbolic links when performing recursive transfers.

Display help text.

Change local directory to

If

is not specified, then change directory to the local user’s home directory.

Display local directory listing of either

or current directory if

is not specified.

may contain any flags supported by the local system’s

command.

may contain

characters and may match multiple files.

Create local directory specified by

Create a link from

to

If the

flag is specified the created link is a symbolic link, otherwise it is a hard link.

Print local working directory.

Display a remote directory listing of either

or the current directory if

is not specified.

may contain

characters and may match multiple files.

The following flags are recognized and alter the behaviour of

accordingly:

Produce single columnar output.

List files beginning with a dot

Do not sort the listing. The default sort order is lexicographical.

When used with a long format option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte, and Exabyte in order to reduce the number of digits to four or fewer using powers of 2 for sizes (K=1024, M=1048576, etc.).

Display additional details including permissions and ownership information.

Produce a long listing with user and group information presented numerically.

Reverse the sort order of the listing.

Sort the listing by file size.

Sort the listing by last modification time.

Set local umask to

Create remote directory specified by

Toggle display of progress meter.

Upload

and store it on the remote machine. If the remote path name is not specified, it is given the same name it has on the local machine.

may contain

characters and may match multiple files. If it does and

is specified, then

must specify a directory.

If the

flag is specified, then attempt to resume partial transfers of existing files. Note that resumption assumes that any partial copy of the remote file matches the local copy. If the local file contents differ from the remote local copy then the resultant file is likely to be corrupt.

If the

flag is specified, then a request will be sent to the server to call

after the file has been transferred. Note that this is only supported by servers that implement the “fsync@openssh.com” extension.

If the

flag is specified, then full file permissions and access times are copied too.

If the

flag is specified then directories will be copied recursively. Note that

does not follow symbolic links when performing recursive transfers.

Display remote working directory.

Quit

Resume download of

Equivalent to

with the

flag set.

Resume upload of

Equivalent to

with the

flag set.

Rename remote file from

to

Delete remote file specified by

Remove remote directory specified by

Create a symbolic link from

to

Display the

protocol version.

Execute

in local shell.

Escape to local shell.

Synonym for help.

Author: dt

Created: 2022-02-22 Tue 16:32