Re: Exit status on `ssh-add` failure
Wiktor Kwapisiewicz via openssh-unix-dev <[email protected]> Mon, 1 Jun 2026 08:18:00 +0000
| Newsgroups | gmane.network.openssh.devel |
|---|---|
| Organization | Metacode |
| Message-ID | <[email protected]> |
Hi Damien, On 21.05.2026 12:23, Damien Miller wrote: >> The certificate has not been added due to agent protocol error but ssh-add >> still returned exit code 0. >> >> The EXIT STATUS section of the manpage for ssh-add states: "Exit status is >> 0 on success, 1 if the specified command fails, and 2 if ssh-add is unable to >> contact the authentication agent." but it doesn't mention what happens when >> the command partially succeeds (identity has been added but the certificate >> not). >> >> Is that the intended behavior of ssh-add? > > This is intentional but somewhat legacy, dating from when certificate support > was fairly rare in ssh-agent. Understood. Would it be a good idea to document this behavior somewhere? (e.g. in man pages of ssh-add or under EXIT STATUS section). If so, I can send a patch (this should be minimal). Thanks for your time! Kind regards, Wiktor