![Forrest logo](/images/logo.png)
sftp
SFTP, or Secure File Transfer Protocol, is a command line tool designed for secure file transfers between hosts over a remote SSH connection. It provides a secure way to transfer files, similar to FTP, but with added encryption for data protection.
The SFTP tool allows users to authenticate and securely transfer files using various authentication methods, including passwords, public key authentication, or keyboard-interactive authentication.
With SFTP, users can perform file manipulation operations such as uploading and downloading files, creating and deleting directories, renaming files, and changing file permissions.
The tool supports both interactive and non-interactive modes. In interactive mode, users can execute commands and view the responses directly on the command line. In non-interactive mode, SFTP can be scripted or used within automated workflows to perform transfers without user intervention.
SFTP supports resume functionality, allowing interrupted file transfers to be resumed from the point of interruption rather than starting over. This feature is particularly useful for transferring large files or dealing with unstable network connections.
It provides comprehensive error handling and logging capabilities, allowing users to monitor the progress of file transfers and troubleshoot any issues that may arise.
SFTP supports various file transfer modes, including binary and ASCII, to ensure compatibility and maintain the integrity of transferred files.
The tool allows for recursive file operations, meaning it can transfer entire directories and their contents recursively with a single command, reducing the effort required for batch transfers.
SFTP can be easily integrated into scripting or automation workflows using shell scripts, batch files, or other programming languages, making it very versatile for use in various system administration tasks.
Overall, SFTP is a reliable and secure command line tool for transferring files over a network, offering encryption, authentication options, file manipulation capabilities, and flexible scripting options.
List of commands for sftp:
-
sftp:tldr:4b25c sftp: Connect using a predefined host (in `~/.ssh/config`).$ sftp ${host}try on your machineexplain this command
-
sftp:tldr:84d97 sftp: Connect using an alternate port.$ sftp -P ${remote_port} ${remote_user}@${remote_host}try on your machineexplain this command
-
sftp:tldr:8faeb sftp: Connect to a remote server and enter an interactive command mode.$ sftp ${remote_user}@${remote_host}try on your machineexplain this command