I've created an Azure Ubuntu VM, using azure cli with the following command: az vm create \ --resource-group rgName \ --name vmName-$RANDOM \ --image UbuntuLTS \ --admin-username adminName \ --generate-ssh-keys
When attempting to ssh into the new vm with ssh adminName@, I'm presented with a login prompt to enter a passphrase.
Unfortunately, my linux user password does not unlock the private key. You can see I didn't specify a passhphrase during the VM creation.
It looks like I created some Azure SSH keys previously and this vm build process put these new ssh keys in the same key store.
How do I determine which method from the docs I used to initially create the keys?
11 Answer
The CLI command az vm create that you have used with the parameter --generate-ssh-keys will create an ssh key in the ~/.ssh.
--generate-ssh-keys
Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory.
You can also create the ssh key yourself with the tool that you choose. And then use the parameter --ssh-key-vaule with your ssh key.