1

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 ?

Bob5421
  • 7,757
  • 14
  • 81
  • 175

1 Answers1

0

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.

More here: https://web.archive.org/web/20160818010904/https://www.stgraber.org/2016/04/12/lxd-2-0-remote-hosts-and-container-migration-612/

Higor E.
  • 698
  • 7
  • 18