Azure / Azure/azure-cli-extensions

[FR] `az network bastion ssh --auth-type ssh-key` Ability to point to Key Vault secret

Open
#7,328 2 comments 7 reactions 1 assignee Claimed by @charwen View on GitHub
Auto-Assign bug customer-reported Network Network - Bastion Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

Would be great if `az network bastion ssh --auth-type ssh-key` could be pointed to a Key Vault secret containing the SSH private key, in addition to current ability to point to a local file.

How I'd like it to work:

```powershell
az network bastion ssh --subscription '' `
--resource-group '' `
--name '' `
--target-resource-id '/subscriptions//resourceGroups//providers/Microsoft.Compute/virtualMachines/' `
--auth-type 'ssh-key' --username '' --ssh-key 'https://.vault.azure.net/secrets/'
```

### Related command

```bash
az network bastion ssh --auth-type ssh-key
```

### Errors

```
Warning: Identity file https://.vault.azure.net/secrets/ not accessible: No such file or directory.
```

### Issue script & Debug output

None

### Expected behavior

Point to Key Vault secret using Azure CLI authenticated context should also work.

### Environment Summary

Not relevant.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.