LinuxCommandLibrary

fzsftp

Securely transfer files using SFTP protocol

SYNOPSIS

fzsftp [options] [host]

PARAMETERS

-v
    Verbose mode: enables debug output.

-u
    Specify username for authentication.

-p
    Specify password for authentication. Avoid using this in scripts, as it exposes the password!

-i
    Specify identity file (private key) for authentication. Applicable for SFTP/SCP.

-P
    Specify port number for the connection.

-hostkey
    Manually specify the host key to bypass key verification.

host
    The hostname or IP address of the server to connect to. It may also include the protocol and username/password, e.g., `sftp://user:pass@host` or `ftp://host`.

DESCRIPTION

The `fzsftp` command is an interactive file transfer program designed to work with FTP, SFTP (SSH File Transfer Protocol), and SCP (Secure Copy Protocol) servers. Unlike command-line tools like `ftp`, `sftp`, or `scp`, `fzsftp` provides an interactive interface allowing users to navigate directories, transfer files, and manage remote systems within a session. It is part of the FileZilla project, intended to be used as the command line tool for FileZilla. It supports a subset of commands found in traditional FTP clients like `get`, `put`, `ls`, `cd`, etc. The tool is particularly useful in scripting scenarios where you need to automate file transfers and directory operations on remote servers with more control than simple non-interactive commands allow.

CAVEATS

  • The primary usage intended for fzsftp is to be called from FileZilla.
  • Password authentication via `-p` is generally discouraged for security reasons. Key-based authentication (using `-i`) is preferred for SFTP/SCP.
  • Host key verification is important for security; avoid bypassing it with `-hostkey` unless absolutely necessary and you understand the risks.

<B>INTERACTIVE COMMANDS</B>

Once connected to a server, `fzsftp` provides interactive commands for navigation and file transfer. Common commands include:

  • `ls`: List directory contents.
  • `cd`: Change directory.
  • `get`: Download a file.
  • `put`: Upload a file.
  • `pwd`: Print working directory.
  • `bye`: Disconnect from the server.
See the FileZilla documentation for a full list.

<B>PROTOCOL HANDLING</B>

The `fzsftp` command automatically detects the protocol based on the host string. For example:

  • `fzsftp ftp://example.com` uses FTP.
  • `fzsftp sftp://example.com` uses SFTP.
  • `fzsftp scp://example.com` uses SCP.
If no protocol is specified, SFTP is often the default.

<B>ERROR HANDLING</B>

Errors are reported to standard error. Error codes are returned to the calling process, which can be used in shell scripts to detect failure.
Refer to FileZilla's error code list for a complete description

HISTORY

The `fzsftp` command is part of the FileZilla project, which started as a student project in 2001. It was developed to provide a more user-friendly FTP client compared to the command-line options available at the time. `fzsftp` acts as a command-line interface to interact with the FileZilla core library. Over time, SFTP and SCP support were added to FileZilla, extending the capabilities of `fzsftp`. It is primarily used in scripts and automated tasks within FileZilla.

SEE ALSO

ftp(1), sftp(1), scp(1), ssh(1)

Copied to clipboard