The sftp backend (backend-sftp) is built on russh + russh-sftp. Every remote binary transfer uses staged temporary files with byte-offset resume and atomic posix-rename commit.
Setup Recipes#
rship auth sftp vps \
--host 10.0.0.5 \
--port 22 \
--user deploy \
--key-file ~/.ssh/id_ed25519 \
--root-path /srv/backups
# Verify host key fingerprint & disk quota via statvfs
rship about vps:Flags Reference (rship auth sftp)#
| Flag | Default | Description |
|---|---|---|
<REMOTE> | — | Logical remote name (e.g. vps, nas-ssh) |
--host | Required | SSH server hostname or IP address |
--port | 22 | TCP port |
--user | Required | SSH username |
--root-path | Empty | Remote working root (e.g. /data/backups or relative backups) |
--key-file | None | Path to private key (ed25519, ecdsa, rsa) |
--key-passphrase | None | Passphrase for encrypted private key file |
--password | None | Password authentication secret |
--host-key-policy | accept-new | accept-new (TOFU), strict (require match in known_hosts), or insecure |
--known-hosts | Default SSH file | Custom known_hosts path |
Protocol Internals & Crash Resume#
- Single-shot vs. resumable staging: Files
<= 256 KiBwrite cleanly via direct staged transfer; larger uploads checkpoint every16 MiBinto.rship.part.*staging files with byte-offset crash-resume and promote atomically via SFTPposix-rename. - Bounded lazy session pooling: Opens SSH/SFTP channels lazily within
rship's concurrency bounds and enforces independentconnect_timeout(15s) andio_timeout(30s) limits. - Storage quota: Queries remote
statvfsextension forrship about <remote>:without spawning an SSH shell. - No server-side copy: Like rclone's SFTP backend,
sftp -> sftptransfers stream through the localBufferPool(<= 64 MiBRSS cap). - rclone migration: Imports
host,port,user, obscuredpass,key_file, andkey_file_passcleanly withrship config import-rclone.