unstale

npm / ssh2-sftp-client

ssh2-sftp-client

What changed in ssh2-sftp-client 8 to 12, from its official release notes, upgrade guides and advisories. Also covers @types/ssh2-sftp-client. Sources checked 2026-10-26.

13 breaking1 security5 new APIs and options4 performance3 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

ssh2-sftp-client 124 changes

Breaking changes 2

  • 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.0release notes

  • The project no longer tests against Node.js 18.x and recommends using at least Node.js 20.x.

    12.0.0release notes

Fixes and other changes 2

  • 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.1release notes

  • Legitimate remote MS SFTP server connection closures no longer raise an exception.

    12.1.0release notes

ssh2-sftp-client 113 changes

Breaking changes 2

  • Global event listeners no longer raise errors; they log events and invalidate the connection object.

    11.0.0release notes

  • 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.0release notes

New APIs and options 1

  • The constructor allows clients to pass custom global event listeners that can take appropriate action for their client.

    11.0.0release notes

ssh2-sftp-client 103 changes

Breaking changes 1

  • 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.0release notes

Security 1

  • Depends on ssh2 1.15.0, which includes a fix for CVE-2023-48795.

    10.0.0release notes

New APIs and options 1

  • Adds a setting to limit concurrent promises used by downloadDir and uploadDir; the default is 10.

    10.0.0release notes

ssh2-sftp-client 913 changes

Breaking changes 6

  • The third argument is now an object with filter, useFastGet, and useFastPut properties instead of a filter function.

    9.0.0release notes

  • The autoClose option is no longer available in options passed to get(); use createReadStream() for low-level control.

    9.0.0release notes

  • list() now accepts a filter function instead of a regular expression to filter returned items.

    9.0.0release notes

  • 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.0release notes

  • The autoClose option is no longer available in options passed to put(); use createWriteStream() for low-level control.

    9.0.0release notes

  • The third argument is now an object with filter, useFastGet, and useFastPut properties instead of a filter function.

    9.0.0release notes

New APIs and options 3

  • Adds a method that returns a read stream connected to a remote file on the SFTP server.

    9.0.0release notes

  • Adds a method that returns a write stream connected to a remote file on the SFTP server.

    9.0.0release notes

  • Adds a method to create a remote copy of a remote file on the SFTP server.

    9.0.0release notes

Performance 3

  • File transfers now use asynchronous calls to help improve speed.

    9.0.0release notes

  • This version appears to perform significantly better than previous versions, although it was not benchmarked.

    9.0.0release notes

  • File transfers now use asynchronous calls to help improve speed.

    9.0.0release notes

Fixes and other changes 1

  • Retrying a connection after initial failure was refactored and improved to handle retry options more reliably.

    9.0.0release notes

ssh2-sftp-client 83 changes

Breaking changes 2

  • 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.0release notes

  • 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.0release notes

Performance 1

  • Directory tree removal better exploits asynchronous processing, with significant performance improvements observed for broad, shallow trees; the API is unchanged.

    8.0.0release notes