So I've setup a Ubuntu server 18.04.01 64bit can connect to it and all that with SSH.

Installed LXD/LXC

I also created a bridge br0 in netplan with DHCP at first an to connect to the containers with SSH and it worked great local.

Then I wanted to do it puclic IP style to connect to one container or multiple I disabled dhcp4 and 6 og both eth0 and br0 and set static IP on br0 to public IP in netplan! For the host part I can connect to the server directly but not the container and that is what I want to.

I already tried setting up SSH on the container on port 23 and static IP is the same as host but I cannot connect with that.

How can I do so I can connect directly to the container with the user created on there

1 Answer 1



lxc config device add <container-name> sshproxy proxy listen=tcp:<public-ip>:23 connect=tcp:<container-ip>:22 bind=host

if your container runs ssh on standard port 22. Get and with lxc list, get the with ifconfig


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.