What if SSH root login is disabled and “su” gets a permission denied error?
user [~]# su –
-bash: /bin/su: Permission denied
We found the entry “PermitRootLogin no” in “/etc/ssh/sshd_config,” which is blocking the ssh root login, and this “su” belongs to the “wheel” group found.
I also tried the “ Main >> Security Center >> Manage root’s SSH Keys” option. It won’t work since the root login is disabled, and the “su” command is denied for all users by default.
During the search, the only option for adding users to the “wheel” group and hence they can be able to use the “su” command.
To find it – login to WHM – Search for wheel, or follow this path
In there, you can add users to the wheel then they would be able to access the shell as root.
I hope that helps.
WHM Shell is a command-line interface (CLI) tool that allows you to manage your web hosting server through a terminal window. It can perform various administrative tasks, including configuring server settings, managing user accounts, and installing software packages.
This error message typically indicates that your user account has insufficient permissions to run the WHM Shell as root. By default, the WHM Shell is only accessible to the root user or users with sudo privileges. If logged in as a non-root user, you may need to use the sudo command to run the WHM Shell with elevated privileges.
To use the sudo command to run the WHM Shell as root, follow these steps:
Open a terminal window and log in to your server as a user with sudo privileges.
Type the following instruct command to switch to the root user:
sudo su –
Type the following command to launch the WHM Shell:
You should now be able to run WHM Shell commands with root privileges.
If you do not have sudo privileges on your server, you must contact your hosting provider or system administrator to request access to the root user account or to have the necessary permissions granted to your user account. Running the WHM Shell as root without proper permissions can be dangerous and may lead to unintended consequences or security risks.