summaryrefslogtreecommitdiff
path: root/sbin/itzks-update-disklserver-squashfs-images
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-01-26 12:36:05 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-01-26 12:36:05 +0100
commitf1e31e9aeb67fa90a383cc1213dea7c2f0867484 (patch)
treed395e97d9ee1d20b19423d504e9862c6c8d2fdb2 /sbin/itzks-update-disklserver-squashfs-images
parent7a34ebc25677507c65af341d56591977d299c55d (diff)
downloaditzks-systems-f1e31e9aeb67fa90a383cc1213dea7c2f0867484.tar.gz
itzks-systems-f1e31e9aeb67fa90a383cc1213dea7c2f0867484.tar.bz2
itzks-systems-f1e31e9aeb67fa90a383cc1213dea7c2f0867484.zip
LTSP: Support providing SSH access to diskless clients.
Diffstat (limited to 'sbin/itzks-update-disklserver-squashfs-images')
-rwxr-xr-xsbin/itzks-update-disklserver-squashfs-images8
1 files changed, 8 insertions, 0 deletions
diff --git a/sbin/itzks-update-disklserver-squashfs-images b/sbin/itzks-update-disklserver-squashfs-images
index e9906c6..c577fcf 100755
--- a/sbin/itzks-update-disklserver-squashfs-images
+++ b/sbin/itzks-update-disklserver-squashfs-images
@@ -138,6 +138,14 @@ for chroot in ${ltsp_chroots}; do
done
+ # Copy the host's SSH host keys to the LTSP client chroot if it doesn't have any host keys
+ host_keys="$(find /etc/ssh/ssh_host_*)"
+ if [ -n "${host_keys}" ]; then
+ for host_key in ${host_keys}; do
+ cp "${host_key}" "${LTSP_OPT}/${chroot}/etc/ssh/"
+ done
+ fi
+
# Copy the SSH authorized_keys file for DLWs to ${LTSP_OPT}/${chroot}/root/.ssh/authorized_keys (e.g. disklserver:/root/.ssh/authorized_keys)
# Use host's authorized_keys file for granting DLW access via SSH as root without password
if [ -e "/root/.ssh/authorized_keys" ] && [ ! -e "${LTSP_OPT}/${chroot}/root/.ssh/authorized_keys" ]; then