After logging in with any user you have created in Ubuntu operating systems, we run the command below.
sudo passwd root
After running the command, it will ask for the password of the user you are logged in with. After entering the password, it will ask you to enter the new password twice for the root user. After completing the process, you can log in to the system with root.
There are a few more steps that need to be done. Otherwise, the system will not accept you to the server and will give an error. Follow the steps below.
1- First, we enter the following command and access the sshd_config file.
sudo nano /etc/ssh/sshd_config
2- We change the part of the file that says "PermitRootLogin without-password" to "PermitRootLogin yes".
3- Finally, we write the following command and restart the SSH service. After rebooting you can access your server.
service ssh restart
You have examined the knowledge base in detail, but if you cannot find the information you need,
Create a Support Ticket