I have a dedicated server with LXD installed where I have a bunch of system containers running to host a lot of my playground services, and to access the operating system of those lxc containers, I need to SSH to the LXD host, then exec or ssh into that LXC container.
This became tedious and wanted a way to directly ssh to them, as they don’t have public ip addresses, it’s not possible but found its possible to access them using proxyjump.
First step is to create our ssh key:
Add the created public key (
~/.ssh/id_rsa.pub) on the hypervisor and the target vm’s
Then create the SSH Config on your local workstation (
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Now accessing our lxc container ctr1, is possible by doing:
1 2 3 4
Thank you for reading