Skip to content

--only-show-errors not honoured for az network bastion ssh #28685

@dazinator

Description

@dazinator

Describe the bug

using the az network bastion ssh
with

  • --auth-type AAD
  • --only-show-errors

This suppresses most output to STDERR except this one

Err> Generated SSH certificate C:\Users\FOO~1\AppData\Local\Temp\AWDAWD\id_rsa.pub-aadcert.pub is valid until 2024-04-03 15:28:39 in local time.

This log output on STDERR should also be supressed as it isn't technically an error.

Related command

az network bastion ssh --auth-type AAD --only-show-errors

Errors

Generated SSH certificate C:\Users\FOO~1\AppData\Local\Temp\AWDAWD\id_rsa.pub-aadcert.pub is valid until 2024-04-03 15:28:39 in local time.

This isn't an error but it was written to STDERR even though --only-show-errors switch was specified.

Issue script & Debug output

Generated SSH certificate C:\Users\FOO~1\AppData\Local\Temp\AWDAWD\id_rsa.pub-aadcert.pub is valid until 2024-04-03 15:28:39 in local time.

Expected behavior

As --only-show-errors is used, it should surpress things from being written to STDERR that aren't actually errors. It works for other logs, but this particular log statement about the cert is not supressed.

Environment Summary

azure-cli 2.53.0 *

core 2.53.0 *
telemetry 1.1.0

Extensions:
azure-devops 0.26.0
bastion 0.2.5
ssh 2.0.2

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\FOO.azure\cliextensions'

Additional context

I am automating executing an ssh command using az network bastion ssh. In this situation in order to work out if the SSH script has problems I don't want false positive errors being written to STDERR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botNetworkaz network vnet/lb/nic/dns/etc...Network - BastionService AttentionThis issue is responsible by Azure service team.act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions