Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ssheval

A cross-platform pure Python script for executing remote commands over SSH and streaming raw stdout/stderr.

🚀 Features

  • Works on NT & POSIX: Requires only Python 2+ and paramiko - no OpenSSH or PuTTY needed.
  • Flexible authentication: Supports password, Ed25519 key, or RSA key via command-line arguments.
  • Faithfully streams stdout & stderr: Outputs both streams in real time, preserving all bytes (works for text and binary data!).
  • Remote exit codes: Exits with the same code as the remote command.
  • SSH-like stdin behavior:
    • Pipes stdin from your console or parent process only if input is provided (matches ssh behavior).
    • If nothing is piped, remote stdin is closed immediately.

⚡️ Why use this instead of plain ssh?

  • No SSH client required on Windows: Works even where ssh is missing (ex: vanilla Windows).
  • Great for automation: Integrates seamlessly with scripts and tools that need to provide credentials non-interactively.
  • Binary-safe: Most SSH client wrappers mishandle binary data or don't stream both stdout and stderr in real time.
  • Stdin-pipes like ssh: Remote command's stdin is hooked up only when data is piped in - just like the real ssh.

🛠️ Installation

pip install ssheval

After installation, run it as ssheval.

paramiko required.

💻 Usage

Basic example:

ssheval \
  --host example.com \
  --username youruser \
  --password 'yourpassword' \
  --command 'ls -lh /tmp'

With an Ed25519 or RSA key:

ssheval \
  --host example.com \
  --username youruser \
  --ed25519-key ~/.ssh/id_ed25519 \
  --command 'ls -lh /tmp'

ssheval \
  --host example.com \
  --username youruser \
  --rsa-key ~/.ssh/id_rsa \
  --command 'ls -lh /tmp'

Pipe something into the remote process:

echo "Hello remote world!" | ssheval --host foo --username bar --password baz --command 'cat -'

Download a remote file (binary-safe):

ssheval --host foo --username bar --password baz --command 'cat /usr/bin/ls' > local_ls_copy

Arguments

Argument Description
--host Hostname or IP of the remote server
--username SSH username
--password SSH password
--ed25519-key Path to an Ed25519 private key for SSH authentication
--rsa-key Path to an RSA private key for SSH authentication
--port SSH port (default: 22)
--command The remote command to execute

🔄 Stdin Handling

This script matches SSH's behavior:

  • If you pipe input in, local stdin is streamed to the remote command.
  • If not, remote stdin is immediately closed - remote commands like cat will finish (not hang).

Examples:

ssheval ... --command 'cat -'         # stdin closed immediately
echo foo | ssheval ... --command 'cat -'   # 'foo' is sent

⚠️ Limitations

  • No PTY/interactive shell allocation.
  • Basic error handling and no advanced SSH features (X11, port forwarding).

🛠️ Contributing

Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.

📄 License

This project is licensed under the MIT License.

Release files for ssheval 0.1.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssheval 0.1.0a2
File Size Uploaded
ssheval-0.1.0a2.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssheval 0.1.0a2
File Interpreter ABI Platform
ssheval-0.1.0a2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.3 kB

Release files / ssheval-0.1.0a2.tar.gz

Download URL ssheval-0.1.0a2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4917d6c172b291c2f817106347539ef5d4be1023078568251bb531c4b7681327
BLAKE2b-256 checksum
How to use checksums
8b0e2594fdfd8008189c25f5e69e7ecf4880c64e50f2cc12afea23cac80c8e56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / ssheval-0.1.0a2-py2.py3-none-any.whl

Download URL ssheval-0.1.0a2-py2.py3-none-any.whl
Size 5.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
cb7fc5479665b4452e5c14a94fe9983e83dc7e62ab9999f8294d8efe268e3938
BLAKE2b-256 checksum
How to use checksums
abba2a8b35217b9dd3c96185f3fa7cd3e387f90dee43982546b30eab95826b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.1.0a2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page