2022-10-01 20:11:32 +01:00
|
|
|
# az sshkey
|
|
|
|
|
2024-03-14 05:01:06 +00:00
|
|
|
> Manage SSH public keys with virtual machines.
|
2023-10-15 08:42:29 +01:00
|
|
|
> Part of `azure-cli` (also known as `az`).
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/cli/azure/sshkey>.
|
2022-10-01 20:11:32 +01:00
|
|
|
|
|
|
|
- Create a new SSH key:
|
|
|
|
|
|
|
|
`az sshkey create --name {{name}} --resource-group {{resource_group}}`
|
|
|
|
|
|
|
|
- Upload an existing SSH key:
|
|
|
|
|
|
|
|
`az sshkey create --name {{name}} --resource-group {{resource_group}} --public-key "{{@path/to/key.pub}}"`
|
|
|
|
|
|
|
|
- List all SSH public keys:
|
|
|
|
|
|
|
|
`az sshkey list`
|
|
|
|
|
|
|
|
- Show information about an SSH public key:
|
|
|
|
|
|
|
|
`az sshkey show --name {{name}} --resource-group {{resource_group}}`
|