# ssh-agent

> An API for interacting with the SSH Agent.

Latest version **0.2.4** (published 2015-07-30) · 0 weekly downloads

## Install

```sh
npm install ssh-agent
pnpm add ssh-agent
yarn add ssh-agent
bun add ssh-agent
```

Provides the commands `ssha-list`, `ssha-sign`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.4 |
| Published | 2015-07-30 |
| First published | 2011-06-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Mark Cavage |
| Maintainers | mcavage, pfmooney |

## Links

- npm: https://www.npmjs.com/package/ssh-agent
- Repository: https://github.com/mcavage/node-ssh-agent
- Issues: https://github.com/mcavage/node-ssh-agent/issues
- npm.io page: https://npm.io/package/ssh-agent

## Dependencies (2)

- [ctype](https://npm.io/package/ctype.md) 0.5.4
- [posix-getopt](https://npm.io/package/posix-getopt.md) 1.1.0

## Recent versions

- 0.2.4 (latest) — 2015-07-30
- 0.2.3 — 2015-02-24
- 0.2.2 — 2013-10-30
- 0.2.1 — 2012-09-01
- 0.2.0 — 2012-08-31
- 0.1.0 — 2011-06-23

## README

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>.

---
_Source: https://npm.io/package/ssh-agent · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
