I'm trying to write an SSH key to /root/.ssh/authorized_keys
during an automated 20.04 server install, but it fails, probably because of permission problems.
The 1st command is successful, the 2nd fails:
late-commands:
- echo 'test2' > /target/etc/test2
- echo 'ssh-rsa ...' > /target/root/.ssh/authorized_keys
How could I achieve that?