Skip to content

Commit 4fce921

Browse files
Merge pull request #224463 from mattmcinnes/patch-30
Freshness pass for SSH Doc
2 parents f8bebb5 + e578775 commit 4fce921

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/virtual-machines/linux/mac-create-ssh-keys.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: virtual-machines
66
ms.collection: linux
77
ms.workload: infrastructure-services
88
ms.topic: how-to
9-
ms.date: 09/10/2021
9+
ms.date: 01/19/2023
1010
ms.author: mattmcinnes
1111
ms.reviewer: jamesser
1212
---
@@ -41,7 +41,7 @@ ssh-keygen -m PEM -t rsa -b 4096
4141
> [!NOTE]
4242
> You can also create key pairs with the [Azure CLI](/cli/azure) with the [az sshkey create](/cli/azure/sshkey#az-sshkey-create) command, as described in [Generate and store SSH keys](../ssh-keys-azure-cli.md).
4343
44-
If you use the [Azure CLI](/cli/azure) to create your VM with the [az vm create](/cli/azure/vm#az-vm-create) command, you can optionally generate SSH public and private key files using the `--generate-ssh-keys` option. The key files are stored in the ~/.ssh directory unless specified otherwise with the `--ssh-dest-key-path` option. If an ssh key pair already exists and the `--generate-ssh-keys` option is used, a new key pair will not be generated but instead the existing key pair will be used. In the following command, replace *VMname* and *RGname* with your own values:
44+
If you use the [Azure CLI](/cli/azure) to create your VM with the [az vm create](/cli/azure/vm#az-vm-create) command, you can optionally generate SSH public and private key files using the `--generate-ssh-keys` option. The key files are stored in the ~/.ssh directory unless specified otherwise with the `--ssh-dest-key-path` option. If an ssh key pair already exists and the `--generate-ssh-keys` option is used, a new key pair won't be generated but instead the existing key pair will be used. In the following command, replace *VMname* and *RGname* with your own values:
4545

4646
```azurecli
4747
az vm create --name VMname --resource-group RGname --image UbuntuLTS --generate-ssh-keys
@@ -92,7 +92,7 @@ With the public key deployed on your Azure VM, and the private key on your local
9292
9393
```
9494

95-
If you're connecting to this VM for the first time, you'll be asked to verify the host's fingerprint. It's tempting to simply accept the fingerprint that's presented, but that approach exposes you to a possible person-in-the-middle attack. You should always validate the host's fingerprint. You need to do this only the first time you connect from a client. To obtain the host fingerprint via the portal, use the Run Command feature to execute the command `ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key.pub | awk '{print $2}'`.
95+
If you're connecting to this VM for the first time, you'll be asked to verify the host's fingerprint. It's tempting to accept the fingerprint that's presented, but that approach exposes you to a possible person-in-the-middle attack. You should always validate the host's fingerprint. You need to do this only the first time you connect from a client. To obtain the host fingerprint via the portal, use the Run Command feature to execute the command `ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key.pub | awk '{print $2}'`.
9696

9797
:::image type="content" source="media/ssh-from-windows/run-command-validate-host-fingerprint.png" alt-text="Screenshot showing using the Run Command to validate the host fingerprint.":::
9898

0 commit comments

Comments
 (0)