Code Monkey home page Code Monkey logo

pub_keys's Introduction

PubKeys

This mix project uses an Elixir script to manage public keys from a git server. It can add and remove public keys from all targetted servers.

Once installed on the git server, users will have to ssh into the git server in order to use the tool: ssh USERNAME@YOUR_MACHINE. Your public key needs to be on the git server to access the server.

Documentation

PubKeys Docs

How to set config file

  • copy dev_example.exs to dev.exs inside the config directory
  • Set your config variable by Replacing "CHANGE ME" with your settings

To build the escript file

  • This mix project generates an escript executable file, which is generated from the elixir script found at lib/pub_keys.
  • To build the escript file run: mix escript.build. This will build with :dev environment by default.
  • Once compiled, this executable does not require Elixir to run. It's only dependancy is Erlang.

How to use it

From anywhere on the git server:

  • pub_keys --help to get help
  • pub_keys --add "key here" to add key to all servers
  • pub_keys --remove "key here" to remove key from all servers
  • pub_keys --deploy-all to push out auth_keys files to all servers (if you want to add a key to files manually, for example)

How it works

  • A master set of auth_keys files exist at: USERNAME@YOUR_MACHINE:/YOURPATH
  • Each file is named with the IP of a targetted server
  • Each file contains the public_keys that should exists on that server
  • The Elixir script allows you to add/remove keys to each file, and then it scp-s those files to the correct server
  • If want to add a key to one or more servers (rather than to all servers), add the key manually to the file, and push all auth_keys files out using the script.

ToDo

  • Don't add/remove key from the YOUR_TARGETTED_MACHINE/.ssh_keys files, if SCP fails

##Contributors @dtcristo

@froesecom

@buntine

pub_keys's People

Contributors

buntine avatar jayzz55 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.