win-sshpass¶
A cross-platform implementation of sshpass (Windows, Linux & macOS): password/key/ssh-agent SSH login, interactive shell, SFTP/SCP/Rsync file transfer, port forwarding (-L/-R), SOCKS5/SOCKS4/HTTP proxy tunneling, JSON output for AI agents, breakpoint resume, file hash/verify, key generation, and a reusable Go SDK.
Quick Start Installation Source
Features¶
- SSH & Shell — Password or private-key authentication, remote command execution, and interactive shell with raw terminal mode (proper echo, Ctrl+C, vim/top support, dynamic resize).
- File Transfer — SFTP upload/download with progress bars, SCP-style and Rsync-style transfer syntax, multiple file support, recursive directory upload.
- Shell rz/sz — Use
rz/szcommands directly in interactive shell — no software needs to be installed on the remote server; transfers go over SFTP. - Key Generation — Built-in SSH key pair generation (Ed25519 and RSA), no ssh-keygen needed. Deploy public keys via SSH to enable password-less login.
- Proxy Tunneling — Tunnel SSH connections through SOCKS5 (with auth), SOCKS4, SOCKS4A, HTTP CONNECT, and HTTPS CONNECT proxies.
- Port Forwarding — Local (
-L) and remote (-R) TCP port forwarding through SSH tunnels, with aForwarderSDK API for programmatic use. - SSH Agent & JSON Mode — Auto-detect and use local ssh-agent for authentication, with optional agent forwarding (
-A). Structured JSON output (-json) for AI agents and automation. - Breakpoint Resume — Resume interrupted SFTP uploads/downloads from where they left off with the
-resumeflag. - File Hash & Verify — Compute and verify local file checksums (MD5, SHA-1, SHA-256, SHA-512) — no SSH connection needed.
- Reusable Go SDK — Import
package sshpassto embed SSH/SFTP/shell in your own app with injectable I/O, progress callbacks, and zero UI dependencies.
30-Second Quick Start¶
# Install via WinGet
winget install chuccp.win-sshpass
# Or via Scoop
scoop bucket add chuccp https://github.com/chuccp/scoop-bucket
scoop install win-sshpass
# Login with password and execute command
win-sshpass -p 'password' ssh user@example.com 'whoami'
# Upload a file
win-sshpass -h example.com -p 'password' -local file.txt -remote /tmp/file.txt
# Open interactive shell
win-sshpass -p 'password' ssh user@host
# Generate SSH key pair
win-sshpass keygen
Quick Navigation¶
| Installation | Quick Start | SSH Connection |
| File Transfer | Interactive Shell | SCP & Rsync |
| Configuration File | Go SDK | Best Practices |
| Changelog |
Dependencies¶
| Dependency | Purpose |
|---|---|
golang.org/x/crypto/ssh |
SSH protocol implementation |
github.com/pkg/sftp |
SFTP file transfer |
github.com/schollz/progressbar/v3 |
CLI progress bar (CLI only) |
github.com/ncruces/zenity |
File dialogs for rz/sz (CLI only, optional) |
win-sshpass is a standalone executable — no external runtime dependencies. Download and run.