Skip to main content

hegemony-transport-asyncssh

AsyncSSH exec-channel device transport for Hegemony.

Registers the asyncssh transport under the hegemony.device_transports entry-point group — for server-like devices (Linux hosts, whitebox NOS, appliances with a real shell) where commands run on SSH exec channels with genuine exit codes, instead of the prompt-scraping network-CLI model netmiko and scrapli implement. Runs natively async (no thread pool). Implements the full SDK Transport surface: execute_command(s) via exec channels, execute_command_timing via a PTY session, scp_put via SFTP, and http_transfer by running curl on the remote host.

The transport is not named in handler ids: netcli.* and other credentialed handlers reach it through ctx.services.connect(), and which transport runs is resolved host-side from device.access_config (access_config.ssh.transport: "asyncssh"). The host resolves credentials into a DeviceConnectionSpec and injects its cancellation registry, so this wheel never imports the platform's secret pipeline or settings.

Host keys

When the host passes a host_key_verifier (hosts that check SSH host keys do; the transport advertises supports_host_key_verifier), each hop, the jump host first and then the device, accepts only the keys the verifier trusts for it. A host that presents another key fails the connection during the key exchange, before a password or private key is sent, and the transport reports the key it saw to the verifier. On first contact the transport fetches the host's key without logging in, has the verifier record it, and then logs in accepting only that key. Without a verifier the transport refuses to connect: it never connects without checking. Checks switched off for a host (the verifier answers None) are the only way to connect unchecked.

Agreed algorithms

When the host passes an ssh_algorithm_recorder (the transport advertises supports_ssh_algorithm_recorder), each hop, the jump host first and then the device, reports the key exchange, host key, cipher and MAC it agreed on once it is logged in. asyncssh keeps both sides' KEXINIT messages, and the agreement is worked out from them. A failure to record is logged and never fails the connection.

SSH algorithm policy

Connections use the SDK's secure SSH policy by default. Both the device and jump host follow that policy. The netcli steps expose an explicit allow_legacy_ssh override; see the netcli security reference for algorithms, key sizes, risks and library limitations.

Hosts constructing the transport directly can call configure_ssh_security(allow_legacy=True) before any I/O. The setting belongs to that transport instance and never changes library-wide defaults.

The connection spec can also allow legacy SSH for one hop: DeviceConnectionSpec.allow_legacy_ssh for the device and JumpHostSpec.allow_legacy_ssh for the jump host. Neither flag reaches the other hop. Each recorded hop says whether the host key it presented is a weak one (SshAlgorithms.weak_host_key).

Metadata

Release files for hegemony-transport-asyncssh 0.59.1

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

Source distribution (sdist)

Source distribution for hegemony-transport-asyncssh 0.59.1
File Size Uploaded Provenance Actions
hegemony_transport_asyncssh-0.59.1.tar.gz 26.8 kB With provenance Details for hegemony_transport_asyncssh-0.59.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hegemony-transport-asyncssh 0.59.1
File Interpreter ABI Platform Actions
hegemony_transport_asyncssh-0.59.1-py3-none-any.whl Python 3 none any Details for hegemony_transport_asyncssh-0.59.1-py3-none-any.whl

Total release size: 54.7 kB

Release files / hegemony_transport_asyncssh-0.59.1.tar.gz

Download URL hegemony_transport_asyncssh-0.59.1.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
69409c068e4e562f0321ff34583a392650818cffd4302fbb5a925268ac57d5e1
BLAKE2b-256 checksum
How to use checksums
7fa99deef448dbff4694399f139fac2e842bc5ce7741955791c66e41aaffdac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / hegemony_transport_asyncssh-0.59.1-py3-none-any.whl

Download URL hegemony_transport_asyncssh-0.59.1-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
963a0e261d468e41664c5185ce7a2155eceba0190671f482259ac49bcca0c068
BLAKE2b-256 checksum
How to use checksums
afc9918fe8ab0ea583a03f3b9f08e0f5f17d95cb332849d6bd1a75d0f0c95143
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for hegemony-transport-asyncssh 0.59.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hegemony_transport_asyncssh-0.59.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.59.1 This release

2 release files Full provenance

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