Create SSH Key Pair for Azure Virtual Machine

Hi Team,

I am currently working on my first task, which involves creating an SSH Key Pair for an Azure Virtual Machine. However, no matter what approach I try, I keep receiving an “Oops!” message stating that “the task was not completed successfully.”

I have double-checked and it appears that the key has indeed been created successfully on my end. Despite trying multiple times, I continue to encounter the same issue.

Could someone kindly assist me in resolving this or provide guidance on what might be causing this problem?

Thank you in advance for your help!

here is the screeshot

First you need to generate the key on the client machine, which you did

ssh-keygen - t rsa

Then you need to copy it to the azure vm

ssh-copy-id devops-kp

Now verify it worked by using ssh to login to the vm without a password

ssh devops-kp

If it works complete the task.

@dave602 thanks for the reply, but I have already done this task using a portal as there was an option to login to portal.

Hi I have similar issue. All you need to do is:

  1. login to azure portal with the credentials provided
  2. Search for shh key in the search bar and generate ssh key
  3. No need to create resources. it is already created by default for the user you login with
  4. Just generate the ssh key with naming convention provided.
  5. then go back to terminal. just complete your task no need to anything else and you should be fine.

Yes, for this task, we need to complete it in the portal, not on the client VM.