Skip to content

Enabling SSH as Root User

slunat edited this page Mar 4, 2024 · 1 revision

By default, SSH will not be possible if trying to login with the root account. You will also not be able to FTP using the root account by default. This can be changed however by doing the following.

  1. Enter the container shell you would like to enable SSH as root for and enter nano /etc/ssh/sshd_config to edit the ssh config file.
  2. Change the line PermitRootLogin prohibit-password to PermitRootLogin Yes and remove the # at the beginning of the line. This will allow you to SSH into the container using the root user.
  3. Save your changes to the file.
  4. You will need to restart the SSH service before the changes are applied. To do this, enter service ssh restart.
  5. Wait a couple of minutes and you should then be able to access your container via SSH.