sysadmin:linux:ssh

SSH

One of the common reasons for not being able to SSH is the root login permission is not given. Let’s discuss how our Support Engineers enable it.

Initially, we login to the server as root.

Now we open the file by running the command

nano /etc/ssh/sshd_config

Then we change the PermitRootLogin from no to yes.

# Authentication
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

SSH to LXC containers

Now we save the file.

After making the changes we were able to login to LXC container using SSH.

Password authentication for SSH

If only key-based is used in the server. The SSH to LXC container will fail. Thus we need to enable Password authentication in the server as well.

Thus we edit /etc/ssh/sshd_config. Then we change PasswordAuthentication from no to yes.

PasswordAuthentication yes

Then we save the file. After that, we were able to SSH to the container.

  • Последнее изменение: 24:11:2025 10:38