Enable root login via SSH on Linux/Unix systems

Most Linux/Unix systems have root login disabled by default.

It is a huge security risk to allow root login via SSH, so if for some particular reason you need root login via SSH, enable it temporarily to perform need tasks, then disable it right away to secure your system.

FreeNAS:

  • go to Services -> SSH config
  • enable Login as Root with password
  • OK to save

Linux/FreeBSD:

  • edit the /etc/ssh/sshd_config file
    • $ sudo nano /etc/ssh/sshd_config
  • set PermitRootLogin yes
  • restart sshd
    • $ systemctl restart sshd

For more information on sshd_config settings read the man page.

Leave a Reply