I am trying to access a VM created with the ssh file and when i tried to execute the command , i am getting the following error,
ssh azureuser@publicIpAddress
I get this error
Permission denied (publickey)
and i am not able to connect to VM. any idea where is the problem?
I had the same issue in the past, Please try with the below command which explicitly specifies which key to use.
ssh -i ~/.ssh/id_rsa azureuser@yourpublicip
where .ssh/id is the key that you generated