How to disable root access via the SSH Terminal extension for Plesk Administrator?

Plesk 18.0.38 includes the SSH Terminal extension within the control panel interface. Using this option all admins will launch the SSH console as root, which might be a significant security threat. In this article, you’ll find out how to disable this feature.

In the following scenarios, Plesk runs utilities or scripts on behalf of the root user by default:

1. Once a Plesk administrator creates a scheduled task and chooses to run it as root, the task are going to be run as root.

2. The event handler is enabled, as a Plesk administrator establishes an event handler and chooses to run the associated command as root.

3. As the SSH Terminal extension is get used by the Plesk administrator and/or subscription owners.

Following is the methods for removing root access:

Method 1:

In the $PRODUCT_ROOT_D/var/ directory, files get created. Along with scheduled tasks, event handlers, and SSH Terminal, It is the most reliable method for disabling root access throughout the system.

1. To connect to the server as root Use SSH.

2. Create a new file known as root.crontab.lock in the $PRODUCT_ROOT_D/var/ directory. Users are unable to run cron tasks or view scheduled tasks that must be run as root as a result of this.

3. Within the $PRODUCT_ROOT_D/var/ directory, you have to create an empty file named root.event handler.lock. Users are unable to create event handlers that execute as root as a result of this.

4. Once you’ve completed the two previous stages, SSH Terminal will not reveal root access .

NOTE: On RPM-based systems, $PRODUCT_ROOT_D is /usr/local/psa, while on Debian-based systems, it is /opt/psa.