Skip to main content

plugin for adding and removing keys to servers

Project description

edwh-demo-plugin

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install edwh-sshkey-plugin

Guide

Generating new keys:

example for ubuntu@user.nl

edwh sshkey.generate --message={message} --owner=ubuntu --hostname=user --doel=nl

possible arguments for ew sshkey.generate:

note:

you atleast need to give this function 2-3 parameters and a message else it will not work.

Adding keys to remote

example for ubuntu@user.nl

edwh sshkey.add-to-remote -H ubuntu@user.nl --keys_to_remote=owner-hostname-goal

possible arguments for ew sshkey.add-to-remote:

  • keys_to_remote: all saved keys you want to add to the remote

Removing SSH keys from a remote machine:

The delete_remote function is used to remove specified SSH keys from a remote machine. The function takes in an iterable of keys to be removed and a Connection object.

usage:

edwh sshkey.delete-remote -H ubuntu@user.nl --keys_to_remote=owner-hostname-doel

possible arguments for ew delete_remote:

  • keys_to_remote: An iterable of keys to be removed from the remote machine. If a string is provided, it is converted into a list with one element.

note:

The function retrieves all key information from the keyholder and checks if the command line key is present in the key information. If it is, the function retrieves the SSH key and removes it from the authorized_keys file on the remote machine. After successfully removing the key, the function prints a success message indicating that the specified key has been removed.

List SSH keys from a remote or local machine:

edwh sshkey.list -H ubuntu@user.nl

Note:

this list all found known and unknown keys on the local or remote server.

License

edwh-ssh-key-plugin is distributed under the terms of the MIT license.

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

edwh_sshkey_plugin-0.1.2.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

edwh_sshkey_plugin-0.1.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file edwh_sshkey_plugin-0.1.2.tar.gz.

File metadata

  • Download URL: edwh_sshkey_plugin-0.1.2.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.0

File hashes

Hashes for edwh_sshkey_plugin-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9625a54201e4595f2ee9dc1b485d73833316162cebd80eef9f4e92164db8eaea
MD5 1b6b89c354c962a9fbb72e76f2a527c9
BLAKE2b-256 e595ea2796b47f09cc65f87c8d940aa076cb30ed9e15b0895c70f6a7213d50ef

See more details on using hashes here.

File details

Details for the file edwh_sshkey_plugin-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for edwh_sshkey_plugin-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c421b106d917bd6cd5c6600073bf7bb0c63f11205f2da548ce9c1436efa06c55
MD5 af994d26ae66fcc44e4dce13830b0767
BLAKE2b-256 6ef167c8fe7cd014c576819082053248763237abde8d9e96fbc35e250861f7df

See more details on using hashes here.

Supported by

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