NetPulse SSH
High-performance, standalone Python library & CLI for concurrent SSH command execution across network devices.
netpulse-ssh is an ultra-fast, resilient SSH execution engine extracted from the NetPulse discovery suite. It allows network engineers and automation pipelines to execute commands across hundreds of network devices simultaneously, without blocking I/O or crashing due to a single offline host.
✨ Features
- Massive Concurrency: Scales horizontally using
asyncioto execute commands across hundreds of targets simultaneously, dramatically reducing execution time. - Bastion Host Routing (ProxyJump): Natively route concurrent execution traffic through an enterprise DMZ Bastion Host. Multiplexes hundreds of internal connections over a single encrypted tunnel to conserve Bastion CPU and port resources.
- Concurrent File Management: Natively utilizes SCP/SFTP protocols to push large firmware payloads or pull configuration backups from 100+ devices simultaneously into IP-segregated folders.
- Pure Python PTY Emulator: Ships with a fully self-contained, cross-platform Pseudo-Terminal (PTY) emulator. Features native raw keystroke capturing (including Arrow keys and Tab-completion) on Windows, entirely independent of the underlying OS SSH binaries.
- Legacy Equipment Healing: Automatically detects strict OpenSSH cipher drops and seamlessly falls back to legacy algorithms (e.g.,
diffie-hellman-group1-sha1,3des-cbc) frequently required for older Cisco or Juniper gear. - Smart Privilege Escalation: Natively supports Cisco
enablemode privilege escalation without breaking automation flows. - Pagination Suppression: Automatically injects
terminal length 0before command execution to bypass interactive--More--prompts. - Automated Deployment Engine (Playbooks): Decouple scripts from targets using YAML Inventory and Playbook definitions. Execute sequential, multi-step configurations effortlessly.
- Interactive "Expect" Engine: Automate interactive prompts (e.g.
Do you want to continue? [Y/n]) by programming standard output regex triggers directly in your YAML Playbooks. - REST API Enabled: Run the built-in FastAPI uvicorn wrapper to serve concurrent execution logic dynamically to web dashboards or automation scripts.
🚀 Quickstart
Installation
Install globally or locally via pip:
pip install netpulse-ssh
CLI Usage
Automated Deployment (Playbooks) Execute a sequential YAML playbook across a grouped YAML inventory:
netpulse-ssh deploy --inventory hosts.yaml --script deploy.yaml
Concurrent Execution Execute a single command across multiple devices concurrently:
netpulse-ssh execute 192.168.1.5 10.0.0.1 -c "show ip interface brief" -u admin -p password
Concurrent File Management (SCP) Push firmware payloads or pull configs across your entire network simultaneously:
# Mass Push Firmware
netpulse-ssh scp push 192.168.1.5 10.0.0.1 --src ./firmware.bin --dest /flash/ -u admin -p password
# Mass Pull Configurations (Auto-segregated into ./backups/<IP>/)
netpulse-ssh scp pull 192.168.1.5 10.0.0.1 --src /etc/nginx/nginx.conf --dest ./backups/ -u admin -p password
Secure Bastion Routing (ProxyJump) Execute commands on internal servers by multiplexing through a single public-facing Bastion host:
netpulse-ssh execute 10.0.0.5 10.0.0.6 -c "uptime" -u admin -p secret -J proxy@bastion.corp.com --bastion-pass proxy_secret
Interactive Shell Drop directly into a live interactive SSH shell to manually configure a specific target:
netpulse-ssh shell 192.168.1.5 -u admin -p password
(If you omit -u or -p, the CLI will securely prompt you for them!)
Python API Integration
Use our cleanly typed Pydantic models and logic natively inside your own tools. The runner is completely agnostic and returns an audit object containing stdout/stderr per host:
import asyncio
from netpulse.ssh.models import SshHostConfig
from netpulse.ssh.runner import SshRunnerService
async def main():
hosts = [
SshHostConfig(ip="192.168.1.1", username="admin", password="password"),
SshHostConfig(ip="10.0.0.1", username="admin", password="password"),
]
runner = SshRunnerService()
audit = await runner.execute_concurrently(hosts, "show version")
for result in audit.results:
print(f"Host {result.ip} status: {result.status}")
print(result.stdout)
if __name__ == "__main__":
asyncio.run(main())
📖 Documentation
Detailed documentation is available in the docs/ directory:
- 🗺️ Usage Guide - Deep dive into CLI and REST API examples.
- 📜 Playbooks & Inventory - Learn how to build Automated Deployment sequences.
- 🏗️ Architecture - Understand the asynchronous execution engine and legacy fallbacks.
- 🧠 Design Decisions - Read about the decoupled persistence approach.
- 🧪 Contributing - The development onboarding guide.
🤝 Contributing
We welcome contributions from the community! netpulse-ssh is open-source and maintained actively.
Please read our Contributing Guidelines to understand how to clone the repository and submit your Pull Requests.
📜 License
Distributed under the MIT License. See LICENSE for more information.
Metadata
Release files for netpulse-ssh 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| netpulse_ssh-0.2.0.tar.gz | 98.9 kB | Without provenance | Details for netpulse_ssh-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netpulse_ssh-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for netpulse_ssh-0.2.0-py3-none-any.whl |
Total release size: 113.8 kB
Release files / netpulse_ssh-0.2.0.tar.gz
| Download URL | netpulse_ssh-0.2.0.tar.gz |
|---|---|
| Size | 98.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4eb340a923d7775b3948427f9e0afaa33f903c620c63950511673221b6ccb0f3
|
|
BLAKE2b-256 checksum How to use checksums |
15070da026008a1aa4eadffc803bebbb1a3fda1d704fae4f5449755242f74bf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / netpulse_ssh-0.2.0-py3-none-any.whl
| Download URL | netpulse_ssh-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7e47dac2f5c849a35ea61d7e1cfcb372c0e2164a11f4d4b1c6eb95dd6b08dcd
|
|
BLAKE2b-256 checksum How to use checksums |
db898b4fe180b59b685659d10620672c6578fe858dec525af967e26c224631cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for netpulse-ssh 0.2.0
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.