ssh connection Permission denied (publickey) on Debian only

Molnar, Miroslav 1 Reputation point

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



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

1 answer

Sort by: Most helpful
  1. Fabricio Lucas Espinoza 0 Reputation points


    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