Skip to content

ab-a/SSH-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT license made-with-bash PRs Welcome Maintenance Prod

SSH Key Management

With this program you'll be able to add your ssh key through a web-ui.

The keys will be store in a json file.

A small script installed on all hosts will pull the json file and add keys for concerned users.

Note : the json database is only store on the web-ui server.

Global Summary

    +-------+
    | WEBui |
    +---+---+
        |  [1]           
+-------|--------+                +-----------------+
|       v        |        [2]     |                 |
|     MASTER     |  <----------------    AGENT      |
|       |        |                |        ^        |
+-------|--------+                +--------|--------+
        |                                  |
        +----------------------------------+
                         [3]
  • [1] - adding the ssh keys to the json database through the web-ui
  • [2] - agent ask the master to get the json
  • [3] - master send the json and the agent apply all modification itself

⚠️ not for production, use at your own risk ⚠️

Todo List :

  • Configuration file for the master
  • Simple and fonctionnal web-ui
  • Manage key through json
  • Possibility to disable key
  • Improve security and clean code
  • Add possibility to list all the key in the web-ui
  • Add possibility to delete the key directly on the web-ui

Prerequisites

# apt-get install jq git php5-fpm nginx

Installation

Master

Create an user who can manage the SSH-Key and specify the home (here /srv/ssh-management) and clone the repo :

# useradd -m -d /srv/ssh-management ssh-management
# cd ~
# git clone https://github.com/ab-a/sshkey.git 
# cp -r sshkey/master/web-ui /srv/ssh-management

Agent

The agent will be run with the user root (or any user with root to have the right to edit all .ssh/auhorized_keys.). Generate an SSH Key and push it to the master server :

# ssh-keygen -t rsa -b 4096

The agent will ask the master, pull and parse the json and set the keys.

The Web-UI

The web-ui allows you to push your SSH key into the json.


simple web-ui


Source : https://www.sanwebe.com/2014/08/css-html-forms-designs

About

Manage your SSH Key efficiently

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published