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.

Metadata

Release files for ssheval 0.1.0a3

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.0a3
File Size Uploaded Provenance Actions
ssheval-0.1.0a3.tar.gz 5.3 kB Without provenance Details for ssheval-0.1.0a3.tar.gz

Built distribution (wheel)

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

Total release size: 11.0 kB

Release files / ssheval-0.1.0a3.tar.gz

Download URL ssheval-0.1.0a3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c3d939f08963e1addd36ec95e5d7059b61f1e2186b26dd85be5ea2a620d7dffa
BLAKE2b-256 checksum
How to use checksums
ed2cd275ca4029be7544ce406cf081c9374ebc8ce69d0afbd165908ef60667fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

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

Download URL ssheval-0.1.0a3-py2.py3-none-any.whl
Size 5.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4d7f99596ff5e50fd57e8b83ef6d293bc7b2465dc5ac2fa50e6c201f110a00a0
BLAKE2b-256 checksum
How to use checksums
0ef1dff33e82d3b63f65098a0848fe8f1eead2496d32e3f65c63cfa8f9ff5ac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for ssheval 0.1.0a3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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