To enable root login via SSH on AlmaLinux 9, follow these steps.
Step 1 : Check SSH Status
First, check if the SSH service is running by using the following command:

Step 2 : Enable the Root Account
If the root account is disabled, set a password for it by running:

You will be prompted to set a new password for the root user.
Step 3 : Open the SSH configuration file in a text editor:
Step 4 : Find the line that says #PermitRootLogin prohibit-password and change it to:

Make sure to remove the # symbol at the beginning of the line.
Step 5 : Restart SSH
After making changes, restart the SSH service to apply the new configuration:

Step 6 : Test the Connection
Test the root login by attempting to SSH into your server:

Enter the root password when prompted.
Congratulations! You have successfully enabled root login via SSH on AlmaLinux 9.