[GH-ISSUE #596] MFA informative messages are not hidden when using quiet mode #155

Closed
opened 2026-05-07 00:19:28 +02:00 by BreizhHardware · 0 comments

Originally created by @toutoen on GitHub (Dec 4, 2025).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/596

Context:

  • bastion version: the-bastion-3.22.00
  • OS: Debian12

I'm trying to connect:

  • to a server added to a group that has "mfa_required" : "any"
  • via a user that has "mfa_totp_bypass" : 1
  • in quiet mode

My issue: when I connect via the_bastion to a host in quiet mode (to get a JSON payload for instance), some messages are added to STDOUT.

$ ssh -T user@mybastion.example.org -- --quiet debian@myhost.example.org -- -- cat hello.json
 2>/dev/null
As this is required for this host, entering MFA phase for user.
... skipping as your account is exempt from MFA.
{"hello": "world"}

What I expect: that the messages don't display in quiet mode, just like the get_details_from_access_array informative messages.

The goal in the above example is obviously that I can pipe the output to a tool like jq without any pre-treatment.

Originally created by @toutoen on GitHub (Dec 4, 2025). Original GitHub issue: https://github.com/ovh/the-bastion/issues/596 Context: - bastion version: `the-bastion-3.22.00` - OS: Debian12 I'm trying to connect: - to a server added to a group that has `"mfa_required" : "any"` - via a user that has `"mfa_totp_bypass" : 1` - in `quiet` mode My issue: when I connect via *the_bastion* to a host in quiet mode (to get a JSON payload for instance), some messages are added to STDOUT. ``` $ ssh -T user@mybastion.example.org -- --quiet debian@myhost.example.org -- -- cat hello.json 2>/dev/null As this is required for this host, entering MFA phase for user. ... skipping as your account is exempt from MFA. {"hello": "world"} ``` What I expect: that the messages don't display in quiet mode, just like the [get_details_from_access_array](https://github.com/ovh/the-bastion/blob/bdc360b421a2ca21609f926e3b470ad5884842df/bin/shell/osh.pl#L1694) informative messages. The goal in the above example is obviously that I can pipe the output to a tool like `jq` without any pre-treatment.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#155
No description provided.