Skip to content
A tool to automate key distribution with user authorization
Branch: master
Clone or download
Latest commit aac2299 Nov 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
SSHKeyDistribut0r Closes #16 Nov 7, 2018
config Moved config file into config directory. Nov 2, 2016
.gitignore Added MANIFEST file Oct 17, 2018
.travis.yml Fixed Python version Oct 17, 2018
CHANGELOG.md Updated requirements Nov 7, 2018
CONTRIBUTORS.md Fixed exception order. Nov 7, 2018
LICENSE.md Merge Mar 17, 2016
MANIFEST.in Added MANIFEST file Oct 17, 2018
README.md Added a note regarding pre-installed public/private keys Nov 6, 2018
requirements.txt
setup.py Version 0.2.3 Nov 7, 2018

README.md

CC BY Build Status

SSHKeyDistribut0r has been written to make SSH key distribution easier for sysop teams.

Screenshot

How to use

Install

pip install SSHKeyDistribut0r

Create configuration files

First, copy the YAML sample files to your users config directory and customize them.

The sample files should be in $HOME/.local/share/SSHKeyDistribut0r/config_sample, /usr/local/share/SSHKeyDistribut0r/config_sample or /usr/share/SSHKeyDistribut0r/config_sample

The config files need to be copied to $USER_CONFIG_DIR/SSHKeyDistribut0r/ ($HOME/.config/... on most Linux systems, check SSHKeyDistribut0r -h for the location on your system)

The keys.yml file has to contain all users which are used in the servers.yml file. Every entry in the YML structure requires the following attributes: The fullname is a string value to mention the full name of a person. keys is a list of SSH keys in the format ssh-rsa <KEY> <comment>.

The servers.yml file contains all servers with the specified user permissions. It consists of a list of dictionaries with the following attributes:

  • ip: String value in the format XXX.XXX.XXX.XXX
  • port: Integer value which specifies the SSH port
  • user: String value which specifies the system user to log in.
  • comment: String value to describe the system
  • authorized_users: List of strings which specify a user. Every user has to be declared in the keys.yml file as a key.

Usage

Run SSHKeyDistribut0r to distribute your SSH keys :)

Note, that a pre-installed public key on the server side with a corresponding private key (without a passphrase or pre-loaded into a local key agent) is required for SSHKeyDistribut0r to work.

Options

  • --dry-run/-n: To verify your configuration whithout actually applying those changes.
  • --keys/-k: Custom path to keys file
  • --server/-s: Custom path to server file
You can’t perform that action at this time.