Consider the scenario :- SSH service in your server ( CPanel ) has falied and its not allowing you to login from backend. But you can login to WHM with any issues. Trying to restart SSH using WHM > Restart Services also is giving a “Failed” result .
You have changed the SSH port for server hardening , but forgot to add the new port to the firewall rules. And after you logout from the current shell you cant login using both ports: -
Please paste the following to your browser
This will reset the current SSH configuration to default configuration and safely restart SSH. As you all know this only works on a Cpanel Server!