SFTP (SSH File Transfer Protocol) is a secure file transfer protocol that operates over the SSH (Secure Shell) protocol. Unlike SCP, which is primarily used for simple file copying, SFTP provides a more robust set of file management capabilities, including the ability to navigate directories, list files, and manage permissions.
Key Features
- Secure Transfer: Encrypts all data and commands to ensure confidentiality and integrity.
- Interactive File Management: Allows users to perform a wide range of file operations, such as uploading, downloading, renaming, and deleting files.
- Resume Capability: Supports resuming interrupted file transfers.
- Directory Listings: Enables listing of files and directories on the remote server.
Basic Usage
To use SFTP, you typically start an SFTP session with a remote server:
Once connected, you can use various commands within the SFTP prompt. Here are some common commands:
Common Commands
-
Upload a file:
-
Download a file:
-
List files in the current remote directory:
-
Change remote directory:
-
Create a directory:
-
Delete a file:
-
Exit the SFTP session:
Security
SFTP is built on SSH, it benefits from the strong security features of SSH, including encrypted connections and secure authentication methods (like passwords and public keys).