After creating a new instance, a private key A will be generated
Use private key A to remotely log in to the server
Import private key A, the file has no format requirements
set password
After entering passwd root, you will be prompted to enter a new password, enter a root password, and you need to enter it again for verification
passwd root
Modify the configuration file
vi /etc/ssh/sshd_config
Remove the comment before PermitRootLogin yes
#PermitRootLogin yes
Remove the comment before PasswordAuthentication yes
#PasswordAuthentication yes
restart service
systemctl restart sshd.service