To enable root login via SSH on Ubuntu 23.10, follow these steps:
Step 1 : To enable the root account, open a terminal and type:
Step 2 : Edit the sshd_config file using a text editor of your choice. For example:
Step 3 : In the sshd_config file, locate the line #PermitRootLogin prohibit-password
and change it to:
Remove the #
at the beginning of the line.
Step 4 : Save the changes and exit the text editor.
Step 5 : Restart the SSH service to apply the changes:
Step 6 : Test the connection by attempting to log in as root:
Congratulations! You have successfully enabled root login via SSH on Ubuntu 23.10.