SSH login as root user

By default, the SSH login as a root user is prevented for security reasons. Nevertheless, they are some cases where the SSH login as the root user is necessary to perform commands that are reserved for the root user under a secure SSH connection.

To log in as a root user, the root user password must be set.

Security Note: With root user access, you can make unlimited changes on the controller. Root rights are therefore only suitable for qualified application programmers and software engineers with relevant experience.
  • Avoid making changes to the PLCnext Technology firmware or Operating System itself. If changes are neccessary, see Overlay File System for details.
  • Do not supply the device with an already set password for the root user.
  • Remove the root password as soon as root user access is not required any more.

To enable or disable direct login via SSH for the root user, you have to configure this in the sshd_config file as shown here:

Activating SSH login as root user

  • Connect to the controller and log in as the root user.
  • Open the /etc/ssh/sshd_config file with a suitable editor.
  • In the # Authentication: section, enable the PermitRootLogin yes entry that is commented out by default.
  • Restart the SSH service with /etc/init.d/sshd restart.

Deactivating SSH login as root user

  • Connect to the controller and log in as the root user.
  • Open the /etc/ssh/sshd_config file with a suitable editor.
  • Change the PermitRootLogin yes entry in the # Authentication: section to a comment again.
  • Restart the SSH service with /etc/init.d/sshd restart.

 

 

 


•  Web browser recommendation: Chrome/Edge 88 or newer, Firefox ESR 90 or neweror Safari • 
• Published/reviewed: 2022-09-14 • Revision 046 •