Skip to main content

Plugin for Netapult to support command execution over SSH

Project description

🐚 Netapult: SSH Plugin



Purpose

This plugin provides the SSH protocol for Netapult, enabling scalable network automation and orchestration for network-connected devices.

Usage

This package registers a ssh protocol handler for Netapult, usable from Netapult's dispatcher.

import time

import netapult.dispatch

with netapult.dispatch.dispatch(
    "generic", # Use the generic client
    "ssh", # Use our SSH protocol
    protocol_options={
        "host": "your-host-here",
        "username": "your-username-here",
        "password": "your-password-here",
    },
) as client:
    # Allow time for the terminal to initialize
    time.sleep(3)

    # Acquire the banner
    banner: str = client.read(text=True)
    prompt_found, result = client.run_command("wall test1\n", text=True)

    print("Banner:", banner)
    print("Result:", result)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netapult_ssh-0.0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netapult_ssh-0.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file netapult_ssh-0.0.1.tar.gz.

File metadata

  • Download URL: netapult_ssh-0.0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netapult_ssh-0.0.1.tar.gz
Algorithm Hash digest
SHA256 32b0bd66f3f3c735d2f63ce527c866061d68be4bc794f6729be24fb7f7b0421b
MD5 54b08d890679aba09a07a8ee3db378cf
BLAKE2b-256 0c4babe7088027c318f43fe678e735097a951b93caa0c08f94cc33b52f8cc782

See more details on using hashes here.

Provenance

The following attestation bundles were made for netapult_ssh-0.0.1.tar.gz:

Publisher: python-publish.yml on Jayson-Fong/netapult-ssh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netapult_ssh-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: netapult_ssh-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for netapult_ssh-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4fe190dec75f48ae5824314e583deaecd9adbe087e6aa2eed5bf1b833fa514ec
MD5 82672d0352244bf6859cca01d8ef320a
BLAKE2b-256 1ed91f630fe6fb941efea2ab6dfc403da2d47fbe44689ee70a8f2412b3474ce3

See more details on using hashes here.

Provenance

The following attestation bundles were made for netapult_ssh-0.0.1-py3-none-any.whl:

Publisher: python-publish.yml on Jayson-Fong/netapult-ssh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page