ssh-agent
An API for interacting with the SSH Agent.
Last updated 12 years ago by mcavage .
Repository · Original npm · Tarball · package.json
$ npm install ssh-agent 
SYNC missed versions from official npm registry.

node-ssh-agent is a client binding to the SSH Agent protocol, written in "pure" node.js. For now, the operations supported are "list keys" and "sign data" (which in SSH parlance is requestIdentities and sign.

Usage

var SSHAgentClient = require('ssh-agent');

var client = new SSHAgentClient();
var data = new Buffer('Hello World');

// Try to sign data with an RSA key (will generate
// an RSA-SHA1 signature).
client.requestIdentities(function(err, keys) {
  var key = null;
  for (var i = 0; i < keys.length; i++) {
    if (keys[i].type === 'ssh-rsa') {
      key = keys[i];
      break;
    }
  }
  if (!key)
    return;

  client.sign(key, data, function(err, signature) {
    console.log('Signature: ' + signature.signature);
  });
});

Installation

npm install ssh-agent

License

MIT.

Bugs

See https://github.com/mcavage/node-ssh-agent/issues.

Current Tags

  • 0.2.4                                ...           latest (9 years ago)

6 Versions

  • 0.2.4                                ...           9 years ago
  • 0.2.3                                ...           10 years ago
  • 0.2.2                                ...           11 years ago
  • 0.2.1                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 6
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE