Skip to content

[Compute] az ssh vm: Raise error for managed identity and Cloud Shell#19051

Merged
jiasli merged 1 commit intoAzure:devfrom
jiasli:ssh
Aug 6, 2021
Merged

[Compute] az ssh vm: Raise error for managed identity and Cloud Shell#19051
jiasli merged 1 commit intoAzure:devfrom
jiasli:ssh

Conversation

@jiasli
Copy link
Copy Markdown
Member

@jiasli jiasli commented Jul 30, 2021

Description

Fix #19048, Email: Unable to use MSI credentials for logging into a VM

As discussed with VM team, VM SSH currently doesn't support managed identity and Cloud Shell.

Currently, with managed identity, the command fails with

$ az ssh vm --resource-group vm-ssh-rg --vm-name myvm
No matched service principal found

In Cloud Shell, the command fails with

$ az ssh vm --resource-group vm-ssh-rg --vm-name myvm
Could not retrieve token from local cache.

This PR replaces these obscure error messages with more definitive ones.

Testing Guide

Run az ssh vm on a VM with managed identity:

$ az ssh vm --resource-group vm-ssh-rg --vm-name myvm
VM SSH currently doesn't support managed identity.

In Cloud Shell:

$ az ssh vm --resource-group vm-ssh-rg --vm-name myvm
VM SSH currently doesn't support Cloud Shell.

@jiasli jiasli requested a review from evelyn-ys as a code owner July 30, 2021 03:03
@jiasli jiasli requested review from SanDeo-MSFT, jamesc and yonzhan July 30, 2021 03:04
@SanDeo-MSFT
Copy link
Copy Markdown

SanDeo-MSFT commented Jul 30, 2021 via email

@jiasli jiasli requested a review from rayluo July 30, 2021 03:21
@yonzhan yonzhan added this to the Aug 2021 (2021-09-07) milestone Jul 30, 2021
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jul 30, 2021

@jiasli to help with

@jiasli jiasli merged commit 120d372 into Azure:dev Aug 6, 2021
@jiasli jiasli deleted the ssh branch August 6, 2021 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az ssh vm on CloudShell returns error 'Could not retrieve token from local cache.'

4 participants