[netboot] add ssh keys
This commit is contained in:
parent
be9616a17f
commit
5e5e37a7d7
1 changed files with 14 additions and 2 deletions
|
@ -5,10 +5,12 @@
|
|||
date=$(date +%F)
|
||||
suite=ascii
|
||||
|
||||
dir=${suit}-${date}
|
||||
dir=${suite}-${date}
|
||||
kernel=${dir}-kernel
|
||||
keyurl=https://code.ungleich.ch/ungleich-public/__ungleich_staff_ssh_access/raw/master/files
|
||||
|
||||
debootstrap "${suite}" "${dir}"
|
||||
chroot ${dir} apt install -y openssh-server rdnssd
|
||||
chroot ${dir} apt install -y openssh-server rdnssd linux-image-amd64
|
||||
|
||||
cat > ${dir}/etc/network/interfaces << EOF
|
||||
auto lo
|
||||
|
@ -17,3 +19,13 @@ iface lo inet loopback
|
|||
auto eth0
|
||||
iface eth0 inet6 auto
|
||||
EOF
|
||||
|
||||
mv ${dir}/boot/vmlinuz-* ${kernel}
|
||||
rm ${dir}/boot/initrd*
|
||||
mkdir -p ${dir}/root/.ssh
|
||||
|
||||
for key in balazs dominique jinguk nico; do
|
||||
curl -s ${keyurl}/${key}.pub >> ${dir}/root/.ssh/authorized_keys
|
||||
done
|
||||
|
||||
( cd ${dir} ; find . | cpio -H newc -o | gzip -9 > ../${dir}-initramfs )
|
||||
|
|
Loading…
Reference in a new issue