Skip to content
Home

SSH File Transfer Protocol (SFTP): secure file transfer over SSH

SFTP (SSH File Transfer Protocol) is a network protocol that provides secure file access, transfer and management over an SSH transport, commonly used instead of FTP or FTPS for encrypted transfers.

Overview

The SSH File Transfer Protocol, commonly called SFTP, is a network protocol designed to provide secure file access, transfer and management over an encrypted Secure Shell (SSH) connection. Unlike legacy FTP, which sends credentials and data in clear text, SFTP runs as a subsystem of an SSH server and protects data with the same cryptographic mechanisms used for secure remote login. Typical implementations listen on the standard SSH port (22) and are provided by widely used SSH servers such as OpenSSH.

Key characteristics

SFTP is more than a simple file copy tool: it defines a set of file and filesystem operations that can be requested across the SSH connection. Common characteristics include:

  • Encrypted transport: All commands and file data are sent over the SSH tunnel, providing confidentiality and integrity.
  • Authentication: Supports password, public key (certificate-style) and host-based authentication methods.
  • Remote file operations: Clients can list directories, read and write files, rename and remove files, and manipulate permissions and symbolic links where supported.
  • Single connection: Uses one multiplexed channel for control and data, avoiding the separate data channel used by classic FTP.
  • Protocol versions: Several versions and extensions exist; interoperability depends on client and server capabilities.

History and development

SFTP emerged during development of SSH-2 as a secure alternative to FTP and as a more capable replacement for older secure copy tools. It evolved from simple file-transfer implementations into a formalized protocol through vendor and standards activity in the late 1990s and early 2000s. Different software projects and vendors extended the base protocol, so practical SFTP feature sets can vary between implementations.

Practical uses and examples

SFTP is used widely for secure file exchange in system administration, web deployment, automated backups, and application integration. Examples include transferring website assets to a hosting server, scripting nightly backups with automated key-based authentication, or enabling file access for remote editors and IDEs. Many graphical and command-line clients support SFTP; popular clients also support traditional FTP and FTPS for environments that require those protocols.

Distinctions and notable facts

SFTP is frequently confused with other secure file-transfer options. It is distinct from:

  • SCP: A simpler command that copies files over SSH but lacks the richer remote-file operations and extensibility of SFTP. See a comparison discussion here.
  • FTPS: FTP over TLS/SSL, which secures the FTP protocol itself and typically uses separate control and data channels; FTPS is not tunneled over SSH. More on protocol differences can be found here.

Because SFTP depends on SSH, any changes to the underlying SSH transport (such as cipher choices, key exchange methods, or port configuration) affect SFTP sessions. Administrators commonly control access via user accounts and public keys, and they may restrict SFTP users to a chrooted directory for isolation. For further technical detail and protocol commands, consult implementation guides or the protocol specification here and comparative resources here.

Note: While SFTP is widely supported and considered secure when configured with modern cryptography and key management, administrators should follow best practices: keep SSH software updated, use strong keys, and audit access logs to reduce risk.

Related articles

Author

AlegsaOnline.com SSH File Transfer Protocol (SFTP): secure file transfer over SSH

URL: https://en.alegsaonline.com/art/92999

Share