Skip to content

131/ssh-keychain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssh-keychain is a RSA vault you can add, list and remove keys from.

Build Status Coverage Status Version License

This module is designed as a backend for 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 author
  • node-rsa