https://github.com/131/ssh-keychain
RSA keychain (mosly)
https://github.com/131/ssh-keychain
keychain rsa ssh-agent
Last synced: 12 months ago
JSON representation
RSA keychain (mosly)
- Host: GitHub
- URL: https://github.com/131/ssh-keychain
- Owner: 131
- License: mit
- Created: 2017-04-21T12:08:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-23T15:09:54.000Z (about 9 years ago)
- Last Synced: 2025-05-05T10:06:52.527Z (12 months ago)
- Topics: keychain, rsa, ssh-agent
- Language: JavaScript
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ssh-keychain is a RSA vault you can add, list and remove keys from.
[](https://travis-ci.org/131/ssh-keychain)
[](https://coveralls.io/github/131/ssh-keychain?branch=master)
[](https://www.npmjs.com/package/ssh-keychain)
[](http://opensource.org/licenses/MIT)
This module is designed as a backend for [ssh-agent-js](https://github.com/131/ssh-agent-js), a nodejs SSH agent.
# API
```
const KeyChain = require('ssh-keychain');
var vault = new KeyChain(); //new empty vault
vault.add_key( fs.readFileSync('some/rsa/key.pem', 'utf-8), 'mykeycomment');
// vault.keys//list current keys in vault
vault.sign("mykeycomment" //or key fingerprint, new Buffer("SomePpayload to sign"));
```
## add_key(PEM encoded key or binary DER [, optionnal key name])
Add a key in the vault, with an optionnal key name.
## sign(fingerprint or key name, payload)
Sign the payload with the desired key
## remove_key(fingerprint or key name)
Remove the key from by its fingerprint (or key name) from the vault
## remove_keys()
Remove all keys from the vault
# Credits
* [131](https://github.com/131) author
* node-rsa