However it's not just every file in /sys/, there are some files you can still scp. For example:
# scp root@localhost:/sys/firmware/efi/runtime .
You can also cp the efi variable file and then scp it fine.
# cp /sys/firmware/efi/efivars/BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c ./
# scp root@localhost:/root/BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c ./
Thank you for taking the time to make this bug Alfonso!
I can reproduce this in a noble-vm very easily.
$ lxc launch ubuntu:noble n-vm --vm sshd_config. d/60-cloudimg- settings. conf password/ PermitRootLogin yes/' /etc/ssh/ sshd_config /sys/firmware/ efi/efivars/ BootOrder- 8be4df61- 93ca-11d2- aa0d-00e098032b 8c .
$ lxc shell n-vm
# rm /etc/ssh/
# sed -i 's/#PermitRootLogin prohibit-
# echo "root:pass" | chpasswd
# systemctl restart ssh
# scp root@localhost:
However it's not just every file in /sys/, there are some files you can still scp. For example:
# scp root@localhost: /sys/firmware/ efi/runtime .
You can also cp the efi variable file and then scp it fine. efi/efivars/ BootOrder- 8be4df61- 93ca-11d2- aa0d-00e098032b 8c ./ /root/BootOrder -8be4df61- 93ca-11d2- aa0d-00e098032b 8c ./
# cp /sys/firmware/
# scp root@localhost: