Azure Cloud Shell : Permission denied (public key)
Matam Kirankumar
Engineering Manager at HashedIn by Deloitte with expertise in Cloud Computing
generate new public key
ssh-keygen
writing key to file
Generating public/private rsa key pair
Enter file in which to save the key (/c/Users/username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/username/.ssh/id_rsa
Your public key has been saved in /c/Users/username/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:iCBS3ygINtWJPahAYh3QZDh8Y6joyrlgA6bjBGXerW8 username@LAPTOP-MNE6JNE7
The key's randomart image is:
+---[RSA 3072]----+
|=*X=* . |
|*BoX B |
|B X + o |
|+* + o . |
|+.. o o S |
|=. . |
|*+. . |
|*+. .E |
| o. .. |
+----[SHA256]-----+.
above you can observe key is written to file "id_rsa"
You can cat this file and check for key and got azure website vm page
paste this key in reset password section--> Reset SSH Public key -> under support and troubleshoot section
you can paste the above key in the "public ssh key"
Now you can use command
ssh azureuser@your_public_ipaddres
Which takes you to inside VM :-)
thanks for reading this article.