Everything was fine until I reached the step where you edit the sshd_config file, I switched to root user , then edited the file and changed the necessary string to Yes for password authentication. Saved the file. Restarted the VM. This is where the problems started. The next step would be to ssh into the vm again and install NoMachine on it.
But I cant ssh into the machine anymore modifying the sshd_config file, It shows me an error saying cant connect to VM instance on port 22.