Skip to content

Layer 2 — vssh (Transport)

Distributed command and file transport daemon. Single TCP port, single Python file, zero dependencies.

Install

pip install vssh

What It Does

vssh is the transport bus for the entire mesh. Every node runs the same daemon as both client and server. It handles SSH, file transfers, P2P connections, and tunneling — all through a single port with HMAC-SHA256 authentication.

Protocol

RPC          remote procedure call (12 methods)
SSH          command execution with PTY
PUT/GET      file transfer (MD5 skip, zlib, parallel streams)
SESSION      persistent connection for multiple commands
SYNC         directory delta transfer
P2P          NAT hole-punch for direct high-speed transfers

Wire format: CMD:HMAC_TOKEN:args\n — HMAC-SHA256 with 60-second timestamp window.

CLI

vssh status                          # Check all server connections
vssh exec myserver "df -h"          # Run command remotely
vssh myserver                        # Interactive terminal
vssh put myserver ./file /remote/    # Upload file
vssh get myserver /remote/file ./    # Download file
vssh sync server-a server-b /data/   # Sync between servers
vssh tunnel myserver 8080 80         # Port forward
vssh speed myserver                  # Transfer speed test
vssh p2p                             # P2P connectivity check

MCP Tools

Tool Parameters Description
vssh_status Connection status for all servers
vssh_exec server, command Execute command on remote server
vssh_put server, local_path, remote_path Upload file
vssh_get server, remote_path, local_path Download file
vssh_sync source, dest, path Sync files between servers
vssh_speed_test server Transfer speed test
vssh_p2p_status P2P NAT hole-punch capabilities
vssh_tunnel server, local_port, remote_port SSH tunnel
vssh_keys Key and auth status

How It Works

Every node runs vssh on TCP port 48291. There is no central server — every node is a peer. vssh tries Wire VPN first, then falls back to Tailscale automatically.

File transfers use MD5 checksums to skip unchanged files, zlib compression, and parallel streams for maximum throughput.

Source

meshpop/vsshpip install vssh