key-db - a file based ssh public key database
Manage a directory of public keys for installation into a authorized_keys file.
The public keys are keys that require restriction of some kind. The general application is to limit to a command that can be run of a server.
Examples:
key-db add -key-dir keys -public-key foo_id_rsa.pub -user foo -command /sbin/nologin -reason safety
key-db add -key-dir keys -public-key bar_id_rsa.pub -user bar -command /sbin/nologin -reason safety
key-db add -key-dir keys -public-key baz_id_rsa.pub -user baz -command /sbin/nologin -reason safety
key-db list -key-dir keys
key-db update -key-dir keys -user foo -command /sbin/only -allowed ps -reason trusted
key-db delete -key-dir keys -user baz
key-db install -key-dir keys -authorized-keys ~/.ssh/authorized_keys
key-db add --help
This a commands based script where the desired operation is passed to the script as the first parameter at the command line.
Add a public key to the -key-dir
directory with the appropriate restrictions in place.
List the keys in the -key-dir
directory.
Update a current key with new information.
Install all the keys from the -key-dir
into the -authorized-keys
file.