WHM Terminal and sshd-config setting PermitRootLogin to no

pineyscripter

Member
Mar 19, 2018
13
1
3
Missouri
cPanel Access Level
Website Owner
Security Advisor warns me that "SSH direct root logins are permitted" and recommends that I change the /etc/ssh/sshd-config parameter PermitRootLogin to "no".
If I do that will I still be able to log into root using the WHM feature "Terminal" that is listed under "Server Configuration" ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello @pineyscripter,

WHM >> Terminal will remain accessible after setting PermitRootLogin to No in /etc/ssh/sshd_config. A person that's able to access Web Host Manager as the root user has the ability to generate SSH keys or run a temporary instance of SSH with their preferred configuration settings.

You can create the /var/cpanel/disable_whm_terminal_ui touch file if you'd like to disable Terminal for WHM users. Creating this touch file will disable Terminal for both resellers and the root user. Here's the full command:

Code:
touch /var/cpanel/disable_whm_terminal_ui
Thank you.