Open gdebezpredel opened 9 months ago
Thank you for opening this issue, we will look into it.
Update: I was able to get past these errors by fixing 2 things:
az account set --subscription "subscription"
127.0.0.1 localhost
entry. It had 127.0.0.1 kubernetes.docker.internal
instead because of docker desktop
But I'm still seeing an error, though it's different:
> az network bastion ssh --name name --resource-group rg --target-resource-id id --auth-type AAD
Command group 'az network' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
/var/folders/w0/dir1/T/dir2 contains sensitive information (id_rsa, id_rsa.pub). Please delete once this certificate is no longer being used.
Generated SSH certificate /var/folders/w0/dir1/T/dir2/id_rsa.pub-aadcert.pub is valid until 2024-02-08 16:35:37 in local time.
user@host@localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Is user@host@localhost
expected? My AAD username is user@host
I have the following roles assigned to me Contributor, Virtual Machine User Login
Describe the bug
I'm trying to set up Bastion with AAD based login following this guides: 1, 2. After setting everything up the command fails. And the error is different depending on whether I use Azure Cloud Shell or local Azure CLI.
Related command
az network bastion ssh --name $name --resource-group $rg --target-resource-id /subscriptions/$sub/resourceGroups/$sub/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss/virtualMachines/0 --auth-type AAD
Errors
Azure Cloud Shell:
Azure CLI:
I checked my access and I have Contributor role which definitely has Microsoft.Network/bastionHosts/read permission
Issue script & Debug output
Azure CLI:
Azure Cloud Shell:
Expected behavior
successful ssh connection to a vm under vmss
Environment Summary
Azure CLI:
Azure Cloud Shell:
Additional context
No response