Skip to main content

OpenSSH known_hosts file edit tool

This is a helper class to edit ~/.ssh/known_hosts. It mostly calls the appropriate ssh-keygen commands. It automatically hashes hostnames if there are already hashed hostnames in ~/.ssh/known_hosts.

Usage:

from ssh_known_hosts_edit import SSHKnownHostsEdit

edit = SSHKnownHostsEdit()
edit.add_to_known_hosts('github.com',
                        'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl')
edit.add_to_known_hosts('github.com',
                        'ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=')
edit.remove_from_known_hosts_by_host('github.com')

Metadata

Release files for ssh-known-hosts-edit 0.2.0

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

Source distribution (sdist)

Source distribution for ssh-known-hosts-edit 0.2.0
File Size Uploaded Provenance Actions
ssh_known_hosts_edit-0.2.0.tar.gz 6.2 kB Without provenance Details for ssh_known_hosts_edit-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ssh-known-hosts-edit 0.2.0
File Interpreter ABI Platform Actions
ssh_known_hosts_edit-0.2.0-py3-none-any.whl Python 3 none any Details for ssh_known_hosts_edit-0.2.0-py3-none-any.whl

Total release size: 12.6 kB

Release files / ssh_known_hosts_edit-0.2.0.tar.gz

Download URL ssh_known_hosts_edit-0.2.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
204dc279e09976069b28ae70735f097360e5f37be98f193d7aeef1540194ad2a
BLAKE2b-256 checksum
How to use checksums
ca699339a3ca51d4a3e2d04c99aba481086a7561dc5a5c4fa38e199b6cfa22dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / ssh_known_hosts_edit-0.2.0-py3-none-any.whl

Download URL ssh_known_hosts_edit-0.2.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
170da55a22603660e4f16d14aa774e7382f23263233d445dbfd53a8bcf4fcbb7
BLAKE2b-256 checksum
How to use checksums
c4be899ae5af7b8a6c7881fb019cf881c0ce749d5509609919bc77162d102e54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Security for ssh-known-hosts-edit 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.

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