How can I move or rebootstrap devices?

Legacy agent version instructions (qbee-agent version < 2023.XX)

Instructions for the legacy version of qbee-agent can be found here

Sometimes it can be useful to rebootstrap one or many devices. You might need to move them between different accounts or you just want to test something. This can be easily achieved like this:

Run the following commands (as root) on command line or include them in a script:

# sudo systemctl stop qbee-agent
# sudo rm /etc/qbee/ppkeys/qbee.key /etc/qbee/ppkeys/qbee.cert
# sudo qbee-agent bootstrap -k <bootstrap-key>
# sudo systemctl start qbee-agent

Obviously these need to be included in a script if you want to do this on a large number of devices.

Considerations:

  • you might want to open port 22 again before you stop the qbee agent
  • when you stop the agent a reboot would start it again
  • if the qbee directory has been removed the device cannot connect to the qbee backend anymore
  • make sure you do not enter a state in which you loose remote access through qbee and CLI