You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -42,27 +42,27 @@ To deploy an ARM template, you need write access on the resources you're deployi
42
42
az account set --subscription "<your-subscription-id>"
43
43
```
44
44
45
-
## Step 2: Create an SSH key pair using Azure CLI
45
+
## Step 2: Create an SSH key pair
46
46
47
-
```azurecli
48
-
az sshkey create --name "mySSHKey" --resource-group "myResourceGroup"
49
-
```
47
+
Create an SSH key pair in Azure and store the private key file for troubleshooting and log collection purposes. For detailed instructions, see [Create and store SSH keys with the Azure CLI](/azure/virtual-machines/ssh-keys-azure-cli), or in the [Azure portal](/azure/virtual-machines/ssh-keys-portal).
50
48
51
-
or, create an SSH key pair using **ssh-keygen**:
49
+
1.[Open a Cloud Shell session](https://shell.azure.com/) in your web browser or launch a terminal on your local machine.
50
+
1. Create an SSH key pair using the [az sshkey create](/cli/azure/sshkey#az-sshkey-create) command:
52
51
53
-
```cmd
54
-
ssh-keygen -t rsa -b 4096
55
-
```
52
+
```azurecli
53
+
az sshkey create --name "mySSHKey" --resource-group $<resource_group_name>
54
+
```
56
55
57
-
To deploy the template, you must provide the public key from the SSH pair. To retrieve the public key, use the `az sshkey show` command:
56
+
or, use the `ssh-keygen` command:
58
57
59
-
```azurecli
60
-
az sshkey show --name "mySSHKey" --resource-group "myResourceGroup" --query "publicKey"
61
-
```
58
+
```azurecli
59
+
ssh-keygen -t rsa -b 4096
60
+
```
61
+
62
+
1. Retrieve the value of your public key from Azure or from your local machine under **/.ssh/id_rsa.pub**.
62
63
63
-
By default, the SSH key files are created in the **~/.ssh** directory. Run the `az sshkey create` or `ssh-keygen` command to overwrite any existing SSH key pair with the same name.
64
+
For more options, you can either follow [Configure SSH keys for an AKS cluster](/azure/aks/aksarc/configure-ssh-keys) to create SSH keys, or use [Restrict SSH access](/azure/aks/aksarc/restrict-ssh-access) during cluster creation. To access nodes afterward, see [Connect to Windows or Linux worker nodes with SSH](/azure/aks/aksarc/ssh-connect-to-windows-and-linux-worker-nodes).
64
65
65
-
For more information about creating SSH keys, see [Create and manage SSH keys for authentication in Azure](/azure/virtual-machines/linux/create-ssh-keys-detailed).
0 commit comments