Socket
Socket
Sign inDemoInstall

ssh-agent

Package Overview
Dependencies
2
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ssh-agent

An API for interacting with the SSH Agent.


Version published
Weekly downloads
388
increased by44.78%
Maintainers
2
Install size
168 kB
Created
Weekly downloads
 

Changelog

Source

0.2.4

  • Fix bug where request callback can be called more than once

Readme

Source

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.

FAQs

Last updated on 30 Jul 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc