Ubuntu instance - Container

When added an Ubuntu container as an Instance in Fangtooth, what is the default root password? I am trying to allow SSH to it, which I have but I cannot figure out the password.

I ran

sudo passwd root

and it allowed me to enter one but I cannot SSH to it. I am likely stupid here but I am not sure.

There’s no default password for root, at least there was no for my Debian lxc. I had to set one myself with passwd

Edit: ssh for root is disabled by default
you have to edit

/etc/ssh/sshd_config

and add or uncomment

 PermitRootLogin yes

and last but not least

systemctl restart ssh

This was it. I forgot SSH for root was disabled by default thanks!

I was stuck there once too, so i took notes on my private github in case i ever forget (and i forget almost every time) :sweat_smile:

1 Like

SSH as root is permitted with public key authentication only by default. See /etc/ssh/sshd_config and specifically the PermitRootLogin statement inside the VM.

Change prohibit-password to yes and remove the # at the start of the line, then restart the SSH service.

Once you uploaded your public key you can change it back.