Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyro2927/sandman
SSH key management gem
https://github.com/pyro2927/sandman
Last synced: about 17 hours ago
JSON representation
SSH key management gem
- Host: GitHub
- URL: https://github.com/pyro2927/sandman
- Owner: pyro2927
- License: mit
- Created: 2013-10-21T03:07:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-22T03:26:01.000Z (about 11 years ago)
- Last Synced: 2024-04-28T22:04:20.461Z (7 months ago)
- Language: Ruby
- Size: 121 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Sandman
Sandman is meant to help manage ssh keys on [GitHub](https://github.com/) and [BitBucket](https://bitbucket.org/).
## Table of Contents
* [Installation](#installation)
* [Usage](#usage)
* [Setup](#setup)
* [Adding keys](#adding-keys)
* [Removing keys](#removing-keys)
* [Viewing keys](#viewing-keys)
* [TODO](#todo)
* [Contributing](#contributing)_Generated with [tocify](https://github.com/pyro2927/tocify)_
## Installation
Add this line to your application's Gemfile:
gem 'sandman'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sandman
## Usage
Sandman is generally meant to be used from the command line, though I guess you could use it through a script if you want.
### Setup
To allow access to your GitHub and BitBucket accounts, you'll need to create a YAML formatted config file at `~/.sandman`. Sample config shown below:
---
:accounts:
- :login: pyro2927
:password: PASSWORD1
:type: Github
- :login: pyro2927
:password: LULZPASSWORD
:type: BitBucketYou can create a sample config by running `sandman createconfig`.
### Adding keys
Sandman can add keys pasted into the terminal, though it can also read them from a file. The name isn't required, though if you don't input one it will use the system's `hostname`.
$ sandman add "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3d5LXLEAOQBVooFVAxWHsolr..." awesomekey
$ sandman add ~/.ssh/id_rsa.pub### Removing keys
Removing keys is just about as easy. To remove a key, you must pass in a string it starts with, or the name/title of the key.
$ sandman rem "ssh-rsa AAAAB3NzaC1yc2E"
$ sandman rem oldkey**Warning: This checks against the starting text of your public key. If you run `sandman rem ssh`, it will remove all of them.**
### Viewing keys
Viewing keys will show your existing keys in any authenticated systems. By default, keys will be truncated to prevent wrapping in the terminal, though they can be printed fully with `showfull`.
$ sandman show
$ sandman showfull## TODO
- [ ] Enable public key marging, syncing all accounts specified
- [ ] Allow arbitrary config file location
- [ ] Support OAuth
- [ ] Add in safeguards to prevent people from deleting all of their public keys
- [ ] Fix crazy nokogiri conflicts between dependancies## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request