az sshkey
Manage ssh public key with vm.
Commands
Name | Description | Type | Status |
---|---|---|---|
az sshkey create |
Create a new SSH public key resource. |
Core | GA |
az sshkey delete |
Delete an SSH public key. |
Core | GA |
az sshkey list |
List all of the SSH public keys. |
Core | GA |
az sshkey show |
Retrieve information about an SSH public key. |
Core | GA |
az sshkey update |
Update an SSH public key resource. |
Core | GA |
az sshkey create
Create a new SSH public key resource.
az sshkey create --name
--resource-group
[--encryption-type {Ed25519, RSA}]
[--location]
[--public-key]
[--tags]
Examples
Create a new SSH public key resource.
az sshkey create --location "westus" --public-key "{ssh-rsa public key}" --resource-group "myResourceGroup" --name "mySshPublicKeyName"
Create a new SSH public key resource using public key in a file.
az sshkey create --location "westus" --public-key "@filename" --resource-group "myResourceGroup" --name "mySshPublicKeyName"
Create a new SSH public key resource with auto-generated value.
az sshkey create --location "westus" --resource-group "myResourceGroup" --name "mySshPublicKeyName"
Create a new SSH public key resource with Ed25519 encryption.
az sshkey create --location "westus" --resource-group "myResourceGroup" --name "mySshPublicKeyName" --encryption-type "Ed25519"
Required Parameters
The name of the SSH public key.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The encryption type of the SSH keys to be generated.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sshkey delete
Delete an SSH public key.
az sshkey delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the SSH public key.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sshkey list
List all of the SSH public keys.
az sshkey list [--resource-group]
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sshkey show
Retrieve information about an SSH public key.
az sshkey show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get an ssh public key.
az sshkey show --resource-group "myResourceGroup" --name "mySshPublicKeyName"
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the SSH public key.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sshkey update
Update an SSH public key resource.
az sshkey update [--ids]
[--name]
[--public-key]
[--resource-group]
[--subscription]
[--tags]
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the SSH public key.
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.