Repository navigation
Ssh2shell 4.0.3
4.0.3 — Correctness fixes for PTY handling, credential redaction, host validation, and run shutdown, plus hardened release and live-test workflows. Patch release; existing 4.0.x usage is unaffected.
Fixed
- A host object without
servernow reports anerrorof typeParameters(primary) orHop(nested) instead of throwing aTypeErrorbefore the connection starts. verbose: truenow redactsprivateKeyin the config dump, alongsidepasswordandpassphrase.exposeCredentials: truestill shows it.pty: falsenow disables the pseudo-terminal. It was previously ignored becausessh2takes the PTY request from the firstshell()argument.stop()andclose({ graceful: true })no longer empty the caller's nestedhostsarrays; the run's own queue is cleared instead, so a host config can be reused.stop()is now a no-op after a run that ended on a failure, andabortOnSudoFailurefinishes as soon as the interrupted shell returns to a prompt instead of waiting out the idle timeout.- A second
connect()now throws instead of calling back with an empty string. EachSSH2Shellinstance runs once; construct a new one to run again.
Development
publish.ymlpasses the release ref throughenv: EXPECTED_REFinstead of shell interpolation, so a crafted tag name cannot inject commands.live.ymlskips the live job for fork pull requests while still running it for same-repo pull requests, pushes, schedules, andworkflow_call.- Added unit coverage for stop-after-failure, sudo prompt return, and instance reuse.
Install
npm install ssh2shell@4.0.3Links
- Changelog: https://github.com/cmp-202/ssh2shell/blob/master/CHANGELOG.md
- Compare: v4.0.2...v4.0.3
- Migrating from 3.x: https://github.com/cmp-202/ssh2shell/blob/master/docs/MIGRATING-4.md