# sftpjs

> sftp api similar to ftp using ssh2

Latest version **2.0.1** (published 2022-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install sftpjs
pnpm add sftpjs
yarn add sftpjs
bun add sftpjs
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-03-15 |
| First published | 2015-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Dan VerWeire |
| Maintainers | wankdanker |
| Keywords | sftp, ftp, ssh, ssh2, file, transfer |

## Links

- npm: https://www.npmjs.com/package/sftpjs
- Repository: https://github.com/wankdanker/node-sftpjs
- Issues: https://github.com/wankdanker/node-sftpjs/issues
- npm.io page: https://npm.io/package/sftpjs

## Dependencies (1)

- [ssh2](https://npm.io/package/ssh2.md) ^1.7.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 2.0.1 (latest) — 2022-03-15
- 2.0.0 — 2022-03-14
- 1.3.7 — 2019-06-26
- 1.3.6 — 2018-01-29
- 1.3.5 — 2017-11-09
- 1.3.4 — 2016-07-22
- 1.3.3 — 2016-05-16
- 1.3.2 — 2015-11-25
- 1.3.1 — 2015-11-12
- 1.3.0 — 2015-09-17
- 1.2.1 — 2015-08-06
- 1.2.0 — 2015-07-29
- 1.1.0 — 2015-07-28
- 1.0.0 — 2015-07-28

## README

sftpjs
-------

This module provides quick access to the sftp functionality in mscdex/ssh2. In addition
it attempts to create an API that is similar to mscdex/node-ftp with the intent of making
them interchangable.

status
------

I intend on implementing the following methods in a compatible way with mscdex/node-ftp:

* .connect() - done
* .end() - done
* .list() - done
* .get() - done
* .put() - done
* .mkdir() - done
* .rename() - done
* .delete() - done

All other methods will be the same as defined in [ssh2-streams/SFTPStream](https://github.com/mscdex/ssh2-streams/blob/master/SFTPStream.md#sftpstream-methods).

example
-------

```js
var Client = require('sftpjs');
var c = Client();

c.on('ready', function () {
  c.list(function (err, list) {
    if (err) throw err;

    console.dir(list);

    c.end();
  });
}).connect({
  host : 'thanks'
  , user : 'for'
  , password : 'allthefish'
});
```

install
-------

```shell
npm install sftpjs
```

api
---

* **(constructor)**() - Creates and returns a new SFTP client instance
* **connect** - see https://github.com/mscdex/ssh2/blob/master/README.md#client-methods

license
-------

MIT

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