> On Jan 9, 2025, at 19:14, Corey Hickey <bugfood-ml@xxxxxxxxxx> wrote: > > To address this, modify ssh-add to: > * [...] > * exit with a status of 0 instead of 1 When Damien wrote: > Adding a new exit status for the > no-keys-in-agent case would be > acceptable too I think. I interpreted that as "make ssh-add exit with status 2 or 3 or 99, for example, as opposed to 1". That is differentiate between: - There is an agent, and it has keys, and ssh-add listed them (exit status 0). - There is no agent, or there is a problem communicating with the agent (exit status 1). - There is an agent, but it has no keys (exit status 2, for example). This mirrors the functionality of `diff`, for example, which exits 0, 1, or 2 for different states (no differences, differences found, or some error). In that case, the stderr message wouldn't strictly be needed, as the exit status would communicate the reason for no keys to be listed; however, it could be useful to humans. The error message can be suppressed in shell scripts using: ssh-add 2>/dev/null Or, for both stderr and stdout: ssh-add >/dev/null 2>&1 (Note, I haven't looked at the OpenSSH code; there may already be more exit statuses that have additional meanings, so 2 may not be the right choice here). -- jim knoble _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev