Cannot connect to my VM

TAZDAIT, Yacine 40 Reputation points
2024-06-12T16:20:02.2233333+00:00

Hello,

I'm trying to connect to my Ubuntu 22.04 VM as usual. However, when I attempt to connect through the portal using SSH with Azure CLI, it prompts me to enter a password, which it never did before. I have tried every password, including previous ones, but none work and I receive the following error after attempting several times: Permission denied (publickey,password).

I also regenerated the SSH key, configured the security group to make my VM accessible through port 22, and reset the user's password, but none of these solutions worked and it prompts the same error after several attempts.

Please, note that the username registered when I created the VM is different from my personal username. When I try to connect using the username I set up, it works, but when I use my personal one, it doesn't work, even though it was working until now.

Can someone help me solve this problem, please?

Any help would be much appreciated.

Regards,

Yacine

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,236 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marcin Policht 31,475 Reputation points MVP
    2024-06-12T16:56:58.1666667+00:00

    You should be using the username set when provisioning the VM.

    You could use your Entra ID account assuming that you enable Entra ID integration for the VM. For that, follow https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-linux


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    1 person found this answer helpful.
    0 comments No comments

Accepted answer
  1. Nikhil Duserla 3,880 Reputation points Microsoft Vendor
    2024-06-12T17:31:32.1566667+00:00

    Hi TAZDAIT, Yacine,

    Thank you for reaching out to us on Microsoft Q&A forum.

    We understand from your query that you are experiencing an issue while attempting to connect to the VM with a username.

    As Marcin Policht mentioned, please also take into consideration the insights I'm providing below.

    We suggest that you use the username you provided for the VM when connecting to it.

    User's image

    When attempting to connect to the VM from Azure CLI, use: ssh [username]@[public-ip].User's image

    Try to reconnect with CLI again.

    If you have any further queries, do let us know.

    If the answer is helpful, please click "Accept Answer" and "Upvote it"

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.