# What changed in ssh2-sftp-client

> 26 changes in ssh2-sftp-client 8 to 12 from its official release notes, upgrade guides and advisories: 13 breaking, 1 security, 5 new APIs and options. Each one cited. Sources checked 2026-10-26. HTML: https://unstale.sh/npm/ssh2-sftp-client/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## ssh2-sftp-client 12

### Breaking changes

- Connection retry support was removed because it added complexity, could leave connection promises pending, and could hurt performance. Users needing retries can add them with a retry promise package. (12.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v12.0.0)
- The project no longer tests against Node.js 18.x and recommends using at least Node.js 20.x. (12.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v12.0.0)

### Fixes and other changes

- Error handlers now invalidate the SFTP connection when an unexpected ECONNRESET occurs, avoiding delayed timeout errors or hanging promises when the client reuses the connection. (12.1.1) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v12.1.1)
- Legitimate remote MS SFTP server connection closures no longer raise an exception. (12.1.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v12.1.0)

## ssh2-sftp-client 11

### Breaking changes

- Global event listeners no longer raise errors; they log events and invalidate the connection object. (11.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v11.0.0)
- Temporary local event listeners now reject the associated promise for events beyond errors, preventing promises from remaining unfulfilled when servers end connections without an error. (11.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v11.0.0)

### New APIs and options

- The constructor allows clients to pass custom global event listeners that can take appropriate action for their client. (11.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v11.0.0)

## ssh2-sftp-client 10

### Breaking changes

- Node 18.18.2 or later is highly recommended, and issue reports require Node 18 or later; Node 16.20.2 still appeared to work. (10.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v10.0.0)

### Security

- Depends on ssh2 1.15.0, which includes a fix for CVE-2023-48795. (10.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v10.0.0)

### New APIs and options

- Adds a setting to limit concurrent promises used by downloadDir and uploadDir; the default is 10. (10.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v10.0.0)

## ssh2-sftp-client 9

### Breaking changes

- The third argument is now an object with filter, useFastGet, and useFastPut properties instead of a filter function. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- The autoClose option is no longer available in options passed to get(); use createReadStream() for low-level control. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- list() now accepts a filter function instead of a regular expression to filter returned items. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- The end property is no longer supported in pipe() operations used by get() and put(); manage piping manually with getReadStream and getWriteStream for low-level control. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- The autoClose option is no longer available in options passed to put(); use createWriteStream() for low-level control. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- The third argument is now an object with filter, useFastGet, and useFastPut properties instead of a filter function. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)

### New APIs and options

- Adds a method that returns a read stream connected to a remote file on the SFTP server. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- Adds a method that returns a write stream connected to a remote file on the SFTP server. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- Adds a method to create a remote copy of a remote file on the SFTP server. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)

### Performance

- File transfers now use asynchronous calls to help improve speed. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- This version appears to perform significantly better than previous versions, although it was not benchmarked. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)
- File transfers now use asynchronous calls to help improve speed. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)

### Fixes and other changes

- Retrying a connection after initial failure was refactored and improved to handle retry options more reliably. (9.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v9.0.0)

## ssh2-sftp-client 8

### Breaking changes

- The optional third argument is now a predicate filter function instead of a regular expression, determining which files and directories are included in the transfer. (8.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v8.0.0)
- The optional third argument is now a predicate filter function instead of a regular expression, determining which files and directories are included in the transfer. (8.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v8.0.0)

### Performance

- Directory tree removal better exploits asynchronous processing, with significant performance improvements observed for broad, shallow trees; the API is unchanged. (8.0.0) — [release notes](https://github.com/theophilusx/ssh2-sftp-client/releases/tag/v8.0.0)
