Giter Site home page Giter Site logo

sshkeystore's Introduction

sshkeystore

Manage a directory of GPG encrypted SSH keys

Internals

sshkeystore takes private SSH keys, removes passwords if necessary, encrypts them with GPG, and then puts them as files in a store directory (~/.sshkeystore by default). The store is designed similarly to the pass utility, and is intended to be synced between computers via git.

When keys are loaded, the decrypted private keys are added the active SSH agent. They are inserted into the agent over a pipe to avoid storing the descrypted private key on disk. Since there can be many keys in an agent, the corresponding public keys are generated and stored as files in a well-known directory (/tmp/sshkeystore-pub_$USER by default). These files can then be passed to SSH as an identity file to load the matching key. Under normal circumstances SSH expects identity files to be a private key, but if given a public key it will try and find the corresponding private key in the same directory. In this case, there are no matching private keys to be found, however, we are able to exploit the fact that SSH checks the running SSH agent for matching keys before trying to load keys from disk. This allows us to specify the private key to use without actually having to have the private key on disk.

Usage

usage: sshks [-h] [-S STORE] [-P PUBDIR] [-V] {list,load,loadall,insert} ...

Manage a directory of GPG encrypted SSH keys

options:
  -h, --help            show this help message and exit
  -S STORE, --store STORE
                        location of the encrypted keystore
  -P PUBDIR, --pubdir PUBDIR
                        temporary location to store the corresponding public keys
  -V, --version         show program's version number and exit

subcommands:
  choose an action to perform

  {list,load,loadall,insert}
    list                lists all keys in the keystore (DEFAULT)
    load                loads a single key into the agent
    loadall             loads all keys in the keystore into the agent
    insert              encrypts a SSH private key and inserts it into the keystore

sshkeystore's People

Contributors

computator avatar

Watchers

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.