Hello @erciyuan old ,
Root account is the username or account that by default has access to all commands and files on a Linux. It is, therefore, many times, you need to login as root in order to perform certain administrative actions.
Standard method to SSH and connect to an azure VM:
However, while creating a Linux VM in azure, you would need to enter a custom username/password and you are not allowed to root. This account is then added to /etc/sudoers to assign admin privileges. Once VM is created, you cannot login to the VM as root, as you don’t know its password. However, there is quick workaround on this.
First, you need to login to Azure VM with the account that has admin privileges. Then you can simply use sudo -i to login as root user. It will only ask for password of current user.
login as: prrudram
Using keyboard-interactive authentication.
Password:
Last login: Sat Jul 23 13:19:54 2017 from prrudram46.domain.com
[prrudram@controller-01 ~]$ sudo -i
[sudo] password for prrudram:
[root@controller-01 ~]#
For connecting using cloudshell you can follow https://learn.microsoft.com/en-us/azure/cloud-shell/quickstart#ssh-into-your-linux-vm
Hope this helps.
--please don't forget to upvote and accept as answer if the reply is helpful--