sftp
Transfer files securely between systems using SSH connections. Upload, download, list, and manage remote files with support for large transfers up to 2GB.
Instructions
Transfer files and manage remote filesystems over SSH (SFTP protocol). Reuses SSH session pool — same authentication and session reuse as the ssh tool. Operations: upload (local to remote), download (remote to local), ls, stat, mkdir, rm, chmod, rename. Async operations: upload_async, download_async (returns transfer_id immediately), status (check progress), cancel. Max file transfer size: 2 GB. Use overwrite=true to replace existing files. Recursive delete is limited to 10,000 items for safety.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | SSH server hostname or IP address (IPv4 or IPv6),required | |
| port | No | SSH port number. Default: 22 | |
| user | Yes | SSH username,required | |
| password | No | Password for authentication | |
| key_file | No | Path to SSH private key file (e.g. ~/.ssh/id_rsa) | |
| passphrase | No | Passphrase for encrypted private key | |
| use_agent | No | Use SSH agent for authentication. Default: true if no other auth method specified | |
| host_key_check | No | Host key verification: strict, tofu (default), none | |
| jump_host | No | Jump/bastion host for ProxyJump (hostname or IP) | |
| jump_port | No | Jump host SSH port. Default: 22 | |
| jump_user | No | Jump host username. Default: same as user | |
| jump_password | No | Jump host password. Default: same as password | |
| jump_key_file | No | Jump host SSH private key file. Default: same as key_file | |
| jump_passphrase | No | Jump host key passphrase. Default: same as passphrase | |
| operation | Yes | SFTP operation: upload, download, upload_async, download_async, status, cancel, ls, stat, mkdir, rm, chmod, rename,required | |
| local_path | No | Local file path (for upload/download) | |
| remote_path | No | Remote file/directory path | |
| recursive | No | Recursive operation (mkdir: create parents, rm: remove directory tree) | |
| mode | No | File permission mode in octal (e.g. 0755). Used by chmod | |
| new_path | No | New remote path (for rename operation) | |
| overwrite | No | Overwrite existing file on upload/download. Default: false | |
| transfer_id | No | Transfer ID for status/cancel operations (returned by upload_async/download_async) |