Azure Cloud Shell : Permission denied (public key)

Azure Cloud Shell : Permission denied (public key)


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

cat the public key stored in file

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"

No alt text provided for this image

Now you can use command

ssh azureuser@your_public_ipaddres

        

Which takes you to inside VM :-)

thanks for reading this article.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了