[SSH] Restore explicit failure for unsupported managed identity and Cloud Shell SSH cert flows#33334
Draft
[SSH] Restore explicit failure for unsupported managed identity and Cloud Shell SSH cert flows#33334
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Agent-Logs-Url: https://github.com/Azure/azure-cli/sessions/04d2b8e6-e20c-4382-849d-f45677f0171f Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix SSH error for Azure VM using AAD
[SSH] Restore explicit failure for unsupported managed identity and Cloud Shell SSH cert flows
May 8, 2026
Collaborator
|
SSH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related command
az ssh vmaz ssh certDescription
az ssh vm/az ssh certcould fall throughProfile.get_msal_token()on managed identity and Cloud Shell accounts and pass an access token to the ssh extension as if it were an OpenSSH certificate. That produced a malformed*-aadcert.pubfile and surfaced asssh-keygen ... invalid formatinstead of the intended user-facing error.Core guard restored
azure-cli-corebefore certificate acquisition.VM SSH currently doesn't support managed identity or Cloud Shell.Behavioral impact
Regression coverage
Testing Guide
History Notes
[SSH]
az ssh vm: Restore explicit error for managed identity and Cloud Shell account flows instead of generating an invalid AAD SSH certificateThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
azcliprod.blob.core.windows.net/usr/bin/python python -m unittest azure.cli.core.tests.test_profile.TestProfile.test_get_msal_token(dns block)/usr/bin/python python -m unittest azure.cli.core.tests.test_profile.TestProfile.test_get_raw_token_mi_system_assigned azure.cli.core.tests.test_profile.TestProfile.test_get_raw_token_in_cloud_shell(dns block)If you need me to access, download, or install something from one of these locations, you can either: