ssh connection Permission denied (publickey) on Debian only

Molnar, Miroslav 1 Reputation point
2022-03-03T14:14:10.22+00:00

I'm getting the famous Permission denied (publickey) error trying to connect to a fresh Debian 11 VM instance. The connection is initiated immediately after the VM instance is deployed (the private key stored during the deployment process).

I'm not experiencing this on a fresh Ubuntu VM instance, this works immediately after I create a new Ubuntu VM.

For both connections I'm issuing the same command, i.e. ssh -i <private key path> azureuser@xxxxxxxxx

Thx,

Miro.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,588 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Fabricio Lucas Espinoza 0 Reputation points
    2023-01-12T20:38:03.3066667+00:00

    Hello,

    I have the same issue. Also, I ran the chmod -R 740 ~/.ssh/, but I am still having the Permission denied (publickey)

    0 comments No comments