--only-show-errors not honoured for az network bastion ssh
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### 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.
Contributor guide
Assessment
This issue has not been assessed yet.