Skip to content

fix(acap-ssh-utils): Pass the password to sshpass through SSHPASS - #279

Merged
apljungquist merged 2 commits into
AxisCommunications:mainfrom
fishloa:sshpass-env
Nov 8, 2026
Merged

apljungquist merged 2 commits into
AxisCommunications:mainfrom
fishloa:sshpass-env

Conversation

@fishloa

@fishloa fishloa commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

From #270. sshpass -p<pass> exposed the password in the process list, and debug!("{cmd:#?}") logged it. The password now goes through SSHPASS with sshpass -e. Command's Debug prints the environment, so the debug logs show only the program and arguments.

Tested make run with RUST_LOG=debug against a P3248-LV on AXIS OS 11.11: the app is patched and runs, and the password does not appear in the output.

@fishloa
fishloa requested a review from a team as a code owner October 29, 2026 15:15

@apljungquist apljungquist left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread crates/acap-ssh-utils/src/lib.rs Resolved
@apljungquist
apljungquist merged commit eb25a22 into AxisCommunications:main Nov 8, 2026
5 checks passed
apljungquist added a commit to apljungquist/acap-cargo that referenced this pull request Nov 8, 2026
Cherry picks acap-rs pull 279 [^1].

---

From acap-rs issue 270. `sshpass -p<pass>` exposed the password in the
process list, and `debug!("{cmd:#?}")` logged it. The password now goes
through `SSHPASS` with `sshpass -e`. `Command`'s `Debug` prints the
environment, so the debug logs show only the program and arguments.

Tested `make run` with `RUST_LOG=debug` against a P3248-LV on AXIS OS
11.11: the app is patched and runs, and the password does not appear in
the output.

[^1]: AxisCommunications/acap-rs#279

Co-authored-by: Alex Fishlock <alex.fishlock@racingjag.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants