If you are not able to SSH into WHM/cPanel server with root and getting password authentication failed error but are sure login details are correct then there might be problem with SSH configuration. You can confirm if root login is correct by login to WHM with same details.
In order to fix and reset SSH so that you can login to debug SSH configuration.
Visit this Link to call cPanel SSH autofixer script
http://yourserverip:2087/scripts2/doautofixer?autofix=safesshrestart
This will prompt you to login to WHM and simply login with root credentials which will run the script.
If you are already logged into WHM then your WHM URL will have session token like this
https://yourserverip:2087/cpsess4766386270/
instead of just
http://yourserverip:2087/
Simply add scripts2/doautofixer?autofix=safesshrestart end of your session token cpsess4766386270
This will kill existing SSH process and restart SSH in safe mode on port 22, Please note if port 22 is busy and script could not kill existing SSH process then it will start safe SSH on port 23 instead of 22
Now SSH again on port 22 and it should log you in.
You can debug SSH configuration from /etc/ssh/sshd_config and to start normal SSH simply restart SSH service using command
service sshd restart