My late_command is not executed during my preseeded installation of Debian jessie. I don't even find the .ssh
directory.
[...]
d-i preseed/late_command string \
in-target mkdir /root/.ssh ; \
in-target /bin/sh -c "echo 'ssh-rsa $long_key > /root/.ssh/authorized_keys" ; \
in-target chmod 0700 /root/.ssh ; \
in-target chmod 0600 /root/.ssh/authorized_keys
d-i finish-install/reboot_in_progress note
Any suggestions what could possibly wrong?
Trailing spaces are not neccessary. I had also problems with chmod instructions.
I attached the snipped, that worked for me:
d-i preseed/late_command string in-target mkdir -p /root/.ssh; \
in-target /bin/sh -c "echo 'ssh-ed25519 AAAAC3NzaC1IAg1wilR9asDXIPwTsvZXasdTXqasdKv0rIqqweAtxGVgup foobar' >> /root/.ssh/authorized_keys"; \
in-target chown -R root:root /root/.ssh/
d-i finish-install/reboot_in_progress note
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With