0
votes

I tried to connect to Azure Linux VM where Ubuntu installed from https://shell.azure.com/bash

ssh username@ipaddress

above command is throwing error as Permission Denied (publickey) .

enter image description here

I have created SSH public key and added it to VM while creating Azure Linux VM following below article.

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal

But still facing Permission Denied issue.

Also, I tried to run bolt command on Azure Linux VM remotely from another windows machine powershell.

I got error as below

Host key verification failed for '10.20.30.40':fingerprint SHA256:mssgkeghbfnb9883yygebwndjhk is unknown for '10.20.30.40'

enter image description here

How to fix above issues. Kindly suggest.

1
Ther is normally a step where you can add an SSH public key during setup of the machine. Which SSH key did you add there in that case? - Joachim Isaksson
I have updated in question. I have already created SSH public key and added it to Azure Linux VM while creating it following article mentioned in question. - John

1 Answers

0
votes

Permission denied (publickey) means that your public key is not in the authorized_keys file. Copy the public key manually to that user's ~/.ssh/authorized_keys file, or use ssh-copy-id which comes with OpenSSH. Also, make sure you're SSH'ing to the right user with ssh user@host