skd
===

[s]IMPLE [k]EY [d]ISTRIBUTION

skd is a tool for the simple distribution of SSH-keys in a growing environment.

It is based on [Django](https://www.djangoproject.com/) and uses the 
[Paramiko SSH-Stack](http://www.lag.net/paramiko) and the 
[Bootstrap3](http://getbootstrap.com/) template together with the
[Django-Bootstrap](https://github.com/dyve/django-bootstrap3)-bindings.

With skd you can create hosts, group them and link that group a group of users
with keys to easily distribute all affected keys. skd generates a DSA- or
RSA-Keypair, that is saved to its database and used as authentication source
for skd itself. This keypair can (and should be) additionally be encrypted
using a passphrase.

Now you can simply add a user with its key and press one button to grant
(and revoke!) the user access to all needed hosts.

Requirements
------------

  * [Python](http://www.python.org) >= 2.6.5
  * [Django](http://www.djangoproject.com) >= 1.5
  * [Paramiko](http://www.lag.net/paramiko) >= 1.12.0
  * [Django-Bootstrap3](https://github.com/dyve/django-bootstrap3) >= 1.1.0

Installation
------------

skd needs a working Django-Installation first. Basically this is installing
Django using pip or easy_install and then creating a project directory by
issuing

    django-admin startproject mysite

Please refer to the [Django-Documentation](https://docs.djangoproject.com) and
specifically the
[tutorial](https://docs.djangoproject.com/en/1.5/intro/tutorial01/) for details.

Afterwards, add "skd" and "bootstrap3" to your INSTALLED_APPS-settings
variable (inside settings.py) and add this line

    url(r'^skd/', include('skd.urls'))

to your URL configuration inside urls.py to start using skd.

Then use

    python manage.py syncdb

to generate the needed models in your configured Django database.

skd needs a login window as all operations need logged-in users. You can use
skd's own login page by adding

    LOGIN_URL='login'

to your settings.py.

Deployment
-------------

For easy testing you can then use

    python manage.py runserver

from the skd root-directory to run a testing server using Django's
built-in development server. After that you can normally reach skd at

    http://127.0.0.1:8000

This is, however, not recommended as skd highly recommends running behind
a HTTPS-secured webserver. You can use Django's supplied wsgi-handler to run
skd using wsgi in webservers like
[apache](https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/modwsgi/)
or [lighttpd](http://redmine.lighttpd.net/projects/lighttpd2/wiki/Howto_WSGI).

Other deployment options are documented on
[the django site](https://docs.djangoproject.com/en/1.5/howto/deployment/).