ccontavalli / ssh-ident

Different agents and different keys for different projects, with ssh.
Other
965 stars 71 forks source link

Silence "All keys already loaded" #52

Closed HaleTom closed 6 years ago

HaleTom commented 6 years ago

Is the message: All keys already loaded really necessary?

It's being printed to STDERR, but it's not an error, as it has loglevel=LOG_INFO:

Some things which check for a non-empty STDERR stream may get confused by this, too.

Perhaps only enable it when given a verbose -v?

Or (less preferred), quieten it with a -q?

HaleTom commented 6 years ago

I'd suggest just disabling:

If allowing a -v or -q, then there would need to be a mandatory -- delimiter afterwards also to distinguish from any options passed through to the $BINARY_SSH command itself.

(ssh also supports -v for instance)

HaleTom commented 6 years ago

Actually, it seems it's not being output to STDERR, but directly to /dev/tty:

% binary=ssh ssh-ident localhost &>/dev/null
All keys already loaded
%

I find this message to be as annoying as the town crier ringing his bell and shouting through the streets:

"3am and all is well"

How can I disable All keys already loaded?

jackm commented 6 years ago

Just change the output verbosity by setting VERBOSITY in the ssh-ident config file to something less verbose than LOG_INFO. This is in the README under "Config file with multiple identities" section 1.

eg. VERBOSITY = LOG_WARN

HaleTom commented 6 years ago

Excellent! Thank you!