OpenSSH known_hosts file edit tool
Project description
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')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ssh_known_hosts_edit-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204dc279e09976069b28ae70735f097360e5f37be98f193d7aeef1540194ad2a |
|
MD5 | 29bc39a8cc4d0ca7de68cd1289cac5b8 |
|
BLAKE2b-256 | ca699339a3ca51d4a3e2d04c99aba481086a7561dc5a5c4fa38e199b6cfa22dd |
Close
Hashes for ssh_known_hosts_edit-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 170da55a22603660e4f16d14aa774e7382f23263233d445dbfd53a8bcf4fcbb7 |
|
MD5 | 43e843035a0e220464fc3d3e0eca3689 |
|
BLAKE2b-256 | c4be899ae5af7b8a6c7881fb019cf881c0ce749d5509609919bc77162d102e54 |