Enable SSH Password Login to VM in Ubuntu
Login to the Server with SSH Key
Access your Ubuntu VM using your existing SSH key credentials.
Edit the SSH Configuration File
Open the SSH daemon configuration file with a text editor:
Find and modify (or add) the following lines to enable password and root logins:
Also, ensure the following line is commented out or set to no:
Restart the SSH Service
Save the file and restart the SSH service to apply your changes:
Set or Reset the Password for the Root or Target User
Set a password for the root account (or another user) with the following command:
Enter and confirm the new password when prompted.