-
Notifications
You must be signed in to change notification settings - Fork 1
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.
- 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. - Change the line
PermitRootLogin prohibit-password
toPermitRootLogin Yes
and remove the#
at the beginning of the line. This will allow you to SSH into the container using the root user. - Save your changes to the file.
- You will need to restart the SSH service before the changes are applied. To do this, enter
service ssh restart
. - Wait a couple of minutes and you should then be able to access your container via SSH.