I have many lxd containers on my system. I cannot access them from network i do not have passwords
Is there a way to attach a bash like we can do on docker for example ?
Enable networking on the remote LXD:
lxc config set core.https_address [::]:8443
lxc config set core.trust_password PASSWORD
Add the target host as a remote (it will ask for PASSWORD
):
lxc remote add REMOTE_NAME IP_ADDRESS
Run commands on the remote system:
lxc exec REMOTE_NAME:CONTAINER COMMAND
To get a shell you can pass bash
or sh
as command in most cases.