How do you preseed an ssh key?

Posted by Wes Felter on Ask Ubuntu See other posts from Ask Ubuntu or by Wes Felter
Published on 2013-10-22T21:38:54Z Indexed on 2013/10/22 22:02 UTC
Read the original article Hit count: 666

Filed under:
|
|

I tried this:

d-i preseed/late_command string mkdir -p /target/root/.ssh
d-i preseed/late_command string cp /cdrom/id_rsa.pub /target/root/.ssh/authorized_keys
d-i preseed/late_command string chmod -R go-rwx /target/root/.ssh

(I'm using a USB installer and I put id_rsa.pub in the root directory of the USB drive.)

The /root/.ssh directory is not created and the installer complains that the chmod command failed (not surprising if the directory doesn't exist).

© Ask Ubuntu or respective owner

Related posts about ssh

Related posts about 13.10