Enable or disable remote root login

When necessary, remote login for the root account can be enabled or disabled as required.

About this task

After installation, upgrade or host maintenance operations, remote login for the root account can be disabled.

Procedure

  1. To enable remote root login, enter the following command:
    /etc/ssh/sshd_config:
    	PermitRootLogin yes #enabled
  2. To disable remote root login, enter the following command:
    /etc/ssh/sshd_config:
    	PermitRootLogin no #disabled

Results

For the change to take effect, the ssh daemon must be restarted:
/etc/init.d/sshd restart