How to Enable Root Login Via SSH on Fedora 40

To enable root login via SSH on Fedora 40, follow these steps:

Step 1 : First, ensure that SSH is running by checking its status:

Step 2 : If the root account is disabled, enable it by setting a password:

Step 3 : Open the SSH daemon configuration file for editing:

Step 4 : Locate the lines containing "PermitRootLogin" and "PasswordAuthentication" and remove the '#' at the beginning of the lines. Change their values to 'yes':

Save and exit the editor.

Step 5 : Restart the SSH service to apply the changes:

Step 6 : Attempt to connect to your Fedora 40 system via SSH using the root account:

Congratulations! You have successfully enabled root login via SSH on Fedora 40.