Index | Thread | Search

From:
Damien Miller <djm@mindrot.org>
Subject:
Re: ssh-add: print error "The agent has no identities." to stderr instead of stdout
To:
David Leadbeater <dgl@dgl.cx>
Cc:
noodle@pastanoggin.com, tech@openbsd.org
Date:
Mon, 10 Nov 2025 11:26:31 +1100

Download raw body.

Thread
On Mon, 10 Nov 2025, David Leadbeater wrote:

> On Sun, 9 Nov 2025 at 08:34, <noodle@pastanoggin.com> wrote:
> [...]
> > Other similar errors in the ssh-add.c log to stderr so it's safe to
> > align this printf too.
> 
> Many people rely on this being on stdout, I would not say this is safe.
> 
> For example, just a sample of dotfiles and such that it's trivial to
> search with GitHub:
> https://github.com/search?q=%2Fgrep+%28%3F%3A-.+%29%3F.%3FThe.agent.has.no.ident%2F&type=code
> (To save clicking, 437 matches, some do redirect stderr, but most don't.)

Yeah, checking exit status is reliable too. 0 = identities found,
1 = no identities, 2 = couldn't communicate with agent / other error.

-d