Skip to main content

SSHepherd: Automated SSH User Management

Project description

SSHepherd: Automated SSH Host Management

SSHepherd - Herd Your Flock!

Description

SSHepherd eases integration of new user accounts for SSH hosts without centralized user management by:

  • Creating the new user account on the target host
  • Adding them to security groups as applicable
  • Placing ssh public keys as applicable

Features

SSHepherd is also capable of some other user management features:

  • Take an inventory of users on each system
  • Delete users from system groups
  • A variety of functions across system groups:
    • delete, lock and unlock users
    • Update ssh keys
    • reset passwords
    • run arbitrary commands

Install

From PIP

pip3 install sshepherd

From Source

git clone https://github.com/drpresq/sshepherd.git
pip3 install ./sshepherd

Usage

usage: sshepherd [-h] [-a {list-users,add-users,run-command}]
                [-t TARGETS [TARGETS ...]] [-p PATH]
                [-c COMMAND [COMMAND ...]]

SSHepherd - herd your flock of ssh hosts

optional arguments:
  -h, --help            show this help message and exit
  -a {list-users,add-users,run-command}, --action {list-users,add-users,run-command}
                        
                        Action to be carried out on targets
                        
  -t TARGETS [TARGETS ...], --targets TARGETS [TARGETS ...]
                        
                        List of ip addresses/hostnames to perform action upon
                        
  -p PATH, --path PATH  
                        Path to New User SSH Public Keys. SSH Key names must conform to the following formats:
				<username>.pub or <username>_somethingelse.pub
                        
  -c COMMAND [COMMAND ...], --command COMMAND [COMMAND ...]
                        
                        Commands to be run on host separated by semicolons
                        

    Common Usage:
	sshepherd -a list-users -t 192.168.1.1 192.168.1.2				Returns a list of users by IP
	sshepherd -a add-users -t 192.168.1.1 -p /home/user/pub-keys			Add users to each target based on key name
	sshepherd -a run-command -t 192.168.1.1 -c sudo whoami; cat /etc/passwd		Runs the two commands on each target

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

sshepherd-0.2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

sshepherd-0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file sshepherd-0.2.tar.gz.

File metadata

  • Download URL: sshepherd-0.2.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for sshepherd-0.2.tar.gz
Algorithm Hash digest
SHA256 62b0a8c8ba049457c9ed1a8cfb2ab1f5ef1cd98273d204a0a33bd7215035465f
MD5 d1435265bdb880ee86eca347e69cf6a5
BLAKE2b-256 bd8e94004e50854aff3607657244859b5b4b4c23ae6dfa878c6f8d527e51ac87

See more details on using hashes here.

File details

Details for the file sshepherd-0.2-py3-none-any.whl.

File metadata

  • Download URL: sshepherd-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10

File hashes

Hashes for sshepherd-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b035913fa392ac9ad8abdf3dd74a3b1e80c43288162926c6cd0378a286604ea0
MD5 1c6baa4b51d266d908db0f1eb99dae00
BLAKE2b-256 8be7979610b3a91ad5d11bff480e6b292db4eee16c7c8b0ebea17313ac0b26b4

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