Some times we may unable to access the server through SSH. This can be due to multiple reasons like custom ssh port, disabled root login, non-availability of ssh user credentials or even due to the absence of wheel user privilege for the SSH user. During such instances we will be helpless even though the SSH server is up and the root password is available.In such cases, we need to reset SSH configuration.
Here you should be able to access the WHM as root, but WHM won’t give you the privilege to modify the SSH server settings or to view the current settings. In such cases, the only possible way is to reset SSH configuration to the default values so that you can use the default port and direct root login to access the server through back end.
In the following parts I am trying to explain the ways to reset the SSH server using the tool “Autofixer” available in WHM.
Here is process to restore SSH settings and access.
1. Login to your WHM using the following URL:
https://HOSTNAME:2087/scripts2/autofixer
When prompted use the root password
For Example:
Let us assume that the server IP is 192.168.1.99, then the URL to be used for invoking the script is
https://192.168.1.99:2087/scripts2/autofixer
2. In the Autofixer interface, put the name safesshrestart as below:
3. Hit the Submit button.
This will restore your SSH configuration.
Now login to the server with the root password and restart your sshd service to revert all the ssh settings as before. You should be able to login easily after that!