Skip to main content

Interactive directory/file transfer with SHA-256 checksum verification over SSH

Project description

verisync — Interactive Directory Transfer with Checksum Verification

PyPI version Python Versions License: MIT

A general-purpose interactive file/directory transfer utility with end-to-end SHA-256 checksum verification over SSH.
Transfer files or directories to a remote server via rsync or tar.gz, then automatically verify every file's integrity — all from a single command.


Table of Contents


Features

  • 📁 File and directory — transfer a single file or an entire directory tree
  • 📦 Batch mode — transfer multiple sources in one run with flexible destination mapping
  • End-to-end SHA-256 verification — a checksum manifest is generated locally and re-verified remotely after transfer
  • ♻️ rsync mode (default) — incremental, resumable, and bandwidth-efficient
  • 🗜️ Zip mode (--zip) — packs each source into a .tar.gz, uploads, and auto-extracts on the remote
  • 🔌 SSH multiplexing — a single SSH control socket is reused across all remote operations, including 2FA/password auth flows
  • 📏 Space checks — remote free disk space is measured before transfer; warns if total exceeds 100 GiB
  • 🖥️ Interactive + CLI — all parameters can be supplied as CLI flags or entered interactively at runtime
  • 🤖 Auto-confirm (-y) — skip prompts for scripted/non-interactive usage
  • 🛡️ Disconnect guard — auto-wraps in screen (or tmux) so SSH drops don't kill the transfer
  • 🔍 Cross-node session discoveryverisync ls and verisync -r find and reattach to active sessions across login nodes (one-step SSH + screen -r, with shell fallback if the session is gone)
  • 🚫 Duplicate-transfer detection — per (source → destination) pair check across active sessions on the same remote; abort, kill the conflicting session, or ignore. Runs before the screen wrap when full config is on the CLI so abort messages reach the terminal
  • 🕒 Elapsed time — reports total transfer and verification duration

Requirements

Requirement Notes
Bash >= 4.0 Required for string manipulations and set -euo pipefail
rsync Used for incremental file transfer in default mode
ssh SSH client with multiplexing (ControlMaster) support
sha256sum Standard coreutils tool, available on all Linux/macOS systems
bc Used for human-readable size arithmetic
tar Only required when using --zip mode

Note: verisync only needs to be installed on the source machine. The remote side requires only sha256sum and standard POSIX shell tools — no remote installation needed.


Installation

Via pip (recommended)

pip install verisync

This places the verisync command on your PATH.

Via pipx (isolated)

pipx install verisync

Manual install

git clone https://github.com/whats2000/verisync.git
cd verisync
bash verisync.sh --help

Usage

verisync [OPTIONS]            Start a new transfer
verisync ls                   List active verisync sessions across login nodes
verisync -r | --reattach      Pick an active session and reattach
                              (cross-node sessions: SSH + auto screen -r)

Arguments

Flag Description
-s, --src <path> Local source file or directory to transfer (repeat for batch)
-u, --user <user> Remote SSH username
-H, --host <host> Remote SSH hostname or IP address
-d, --dest <path> Remote destination (1 shared dest OR one per --src)
--zip Pack each source into tar.gz before transferring
-y, --yes Auto-confirm all prompts (non-interactive mode)
-h, --help Show usage and exit

Any flag not supplied on the command line will be prompted interactively.

Examples

Interactive mode (prompts for all parameters):

verisync

Fully specified via CLI:

verisync --src /data/project --user alice --host hpc.example.com --dest /scratch/alice/

Batch mode (multiple sources to shared destination):

verisync -s /data/file1.txt -s /data/dir2 -d /remote/shared/ -u alice -H hpc.example.com

Batch mode (1:1 source-to-destination mapping):

verisync -s /local/a -s /local/b -d /remote/x -d /remote/y -u alice -H hpc.example.com

Use zip mode for compressed uploads:

verisync -s /data/project -u alice -H hpc.example.com -d /scratch/alice/ --zip

Non-interactive mode (auto-confirm all prompts):

verisync -s /data/project -u alice -H hpc.example.com -d /scratch/alice/ -y

List active sessions across login nodes:

verisync ls

Reattach to an active session (auto-SSH + screen -r for cross-node):

verisync -r

Transfer Steps

Step Description
1 Collect source(s), destination(s), remote user, and host
2 Measure total local size; warn if > 100 GiB
3 Test SSH connectivity; check remote free disk space for each destination
4 For each source: generate SHA-256 checksum manifest
5 For each source: transfer files + manifest via rsync (or tar.gz)
6 For each source: verify checksums remotely
7 Print batch summary (pass/fail per source)

Modes: rsync vs zip

Feature rsync (default) --zip mode
Resumable? Yes No
Incremental? Yes No
Single archive? No Yes (per source)
Compression -z (inline) gzip (pre-compressed)
Remote extraction Not needed Auto-extracted via tar

Contributing

Bug reports and pull requests are welcome at github.com/whats2000/verisync.


License

MIT — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verisync-1.3.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verisync-1.3.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file verisync-1.3.0.tar.gz.

File metadata

  • Download URL: verisync-1.3.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for verisync-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a318c7aca22b2b962b5d3f01599e128ab503b0a49caab3a784760c0f8d6d57ec
MD5 d3423fc1b67a4d6f0ab19f2e2f9a6850
BLAKE2b-256 8d0acc77606b7ac1d05fb72e557fb0d5d4c0df117a40e4538bf72009723e766d

See more details on using hashes here.

Provenance

The following attestation bundles were made for verisync-1.3.0.tar.gz:

Publisher: publish.yml on whats2000/verisync

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file verisync-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: verisync-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for verisync-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a101ae0dff4a1186b178d086189e80d175ba42b42aba4a7c7e80f3373641ae26
MD5 ff781f9795475d4f558d0ffc5445e91c
BLAKE2b-256 323b71256e27cf670fb44a29fd2b1733db3dbbe38f58cb44594a537d7f8ccd18

See more details on using hashes here.

Provenance

The following attestation bundles were made for verisync-1.3.0-py3-none-any.whl:

Publisher: publish.yml on whats2000/verisync

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page