Basically, the wheel user login is a security measure that allows you to restrict access to certain commands and operations on the system to only those users who are authorized to perform them.
If this feature is enabled, you will not be able to login to the server via SSH as the root user. You should access the server via SSH as another user, and then you can switch to the root user.
1. First, we need to login the server via SSH as the root user
2. Then, we need to add the user by the below command.
3. You need to give that user the sudo privilege, so navigate to the /etc/sudoers file and add the line that follows.
$username ALL=(ALL) ALL
Please refer the mentioned screenshot
Follow the procedure given below to disable the server's ssh access for the root user.
1. Open the SSH configuration file using a text editor. The location of this file can vary depending on your Linux distribution, but it is usually located at "/etc/ssh/sshd_config".
$ vi /etc/ssh/sshd_config
2. In the SSH configuration file, we should modify the below line.
3. Save and exit the file
4. Restart the SSH service to apply the changes, using below commands.
$ sudo systemctl restart sshd
$ service sshd restart
Enabling wheel user mode on a Linux server is a practical way to grant elevated privileges to specific users while maintaining control and security over system administration. By following the steps outlined in this article, you can effectively configure wheel group access and ensure that your server remains secure while allowing authorized users to perform administrative tasks.